{"id":15693576,"url":"https://github.com/gabriel-pinheiro/logtunnel","last_synced_at":"2025-05-08T04:44:17.530Z","repository":{"id":46343574,"uuid":"405037802","full_name":"gabriel-pinheiro/logtunnel","owner":"gabriel-pinheiro","description":"CLI tool that allows you to format, filter and search your log output","archived":false,"fork":false,"pushed_at":"2021-10-29T21:27:39.000Z","size":302,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T04:35:59.324Z","etag":null,"topics":["cli","filter","format","grep","log"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabriel-pinheiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-10T10:10:28.000Z","updated_at":"2022-06-22T20:45:55.000Z","dependencies_parsed_at":"2022-09-02T16:27:09.647Z","dependency_job_id":null,"html_url":"https://github.com/gabriel-pinheiro/logtunnel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-pinheiro%2Flogtunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-pinheiro%2Flogtunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-pinheiro%2Flogtunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-pinheiro%2Flogtunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabriel-pinheiro","download_url":"https://codeload.github.com/gabriel-pinheiro/logtunnel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251795422,"owners_count":21645023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","filter","format","grep","log"],"created_at":"2024-10-03T18:46:07.356Z","updated_at":"2025-05-08T04:44:17.469Z","avatar_url":"https://github.com/gabriel-pinheiro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logtunnel\n\nCLI tool that allows you to format, filter and search your log output\n\n## Requirements\n\n- [NodeJS \u003e= 12](https://nodejs.org/en/download/)\n- [NPM](https://docs.npmjs.com/cli/v7/configuring-npm/install)\n\n## Installation\n\n``sudo npm i -g logtunnel``\n\n## Usage\n\nFind logs that contain \"alice\":\n``curl -s https://cdn.codetunnel.net/lt/text.log | lt alice``\n\nFind logs that contain \"alice\" and \"purchase\":\n``curl -s https://cdn.codetunnel.net/lt/text.log | lt -f alice -f purchase``\n\nFind logs that contain \"alice\" and ignore the ones that contain \"info\":\n``curl -s https://cdn.codetunnel.net/lt/text.log | lt -f alice -i info``\n\nParse logs as JSON and output them with that template:\n``curl -s https://cdn.codetunnel.net/lt/json.log | lt -p json -o '[{{lvl}}] {{log}}'``\n\nParse logs as JSON, apply template and find the ones containing \"alice\":\n``curl -s https://cdn.codetunnel.net/lt/json.log | lt -p json -o '[{{lvl}}] {{log}}' -f alice``\n\nParse logs as JSON, apply template and show the ones with \"delay \u003e 200\":\n``curl -s https://cdn.codetunnel.net/lt/json.log | lt -p json -o '[{{lvl}} in {{delay}}ms] {{log}}' -F 'delay \u003e 200'``\n\nParse logs as JSON, apply template and show the ones with \"log\" containing \"Alice\":\n``curl -s https://cdn.codetunnel.net/lt/json.log | lt -p json -o '[{{lvl}}] {{log}}' -F 'log.toLowerCase().includes(\"alice\")'``\n\nParse logs as logfmt, show the ones with \"delay \u003e 200\" and show their original line (as if no parsing happened):\n``curl -s https://cdn.codetunnel.net/lt/logfmt.log | lt -p logfmt -o original -F 'delay \u003e 200'``\n\nParse logs with regex, and output in logfmt:\n``curl -s https://cdn.codetunnel.net/lt/text.log | lt -p '\\[(?\u003clvl\u003e\\S*) in\\s*(?\u003cdelay\u003e\\d*)ms\\] (?\u003clog\u003e.*)' -o logfmt``\n\nParse logs with regex, and show the ones with \"delay \u003e 200\":\n``curl -s https://cdn.codetunnel.net/lt/text.log | lt -p '(?\u003cdelay\u003e\\d+)ms' -o original -F 'delay \u003e 200'``\n\nParse table and show rows containing \"cilium\":\n``curl -s https://cdn.codetunnel.net/lt/table.log | lt -p table -o original -f cilium``\n\nParse table, show rows containing \"cilium\" and the first headers row:\n``curl -s https://cdn.codetunnel.net/lt/table.log | lt -p table -o original -f cilium -H``\n\nParse table, show rows with RESTARTS \u003e 0:\n``curl -s https://cdn.codetunnel.net/lt/table.log | lt -p table -o original -F 'RESTARTS \u003e 0' -H``\n\nShow rows that are not ready:\n``curl -s https://cdn.codetunnel.net/lt/table.log | lt -p '(?\u003cup\u003e\\d)/(?\u003ctotal\u003e\\d)' -o original -F 'up \u003c total' -H``\n\nFor more information ``lt --help``","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabriel-pinheiro%2Flogtunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabriel-pinheiro%2Flogtunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabriel-pinheiro%2Flogtunnel/lists"}