{"id":37177363,"url":"https://github.com/qiangyt/jog","last_synced_at":"2026-01-14T20:41:07.397Z","repository":{"id":56336013,"uuid":"275784511","full_name":"qiangyt/jog","owner":"qiangyt","description":"Command line tool to view structured(JSON) log like 'tail -f', with filtering by log level and time range","archived":false,"fork":false,"pushed_at":"2023-03-07T20:37:34.000Z","size":859,"stargazers_count":43,"open_issues_count":17,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T19:45:19.502Z","etag":null,"topics":["convert","filter","json","log","structured"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qiangyt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T09:49:38.000Z","updated_at":"2025-08-17T22:38:58.000Z","dependencies_parsed_at":"2024-06-19T00:05:05.815Z","dependency_job_id":"cb2e490a-40b0-427c-92e9-3f024cdccec4","html_url":"https://github.com/qiangyt/jog","commit_stats":null,"previous_names":["qiangyt/j2log"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/qiangyt/jog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiangyt%2Fjog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiangyt%2Fjog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiangyt%2Fjog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiangyt%2Fjog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qiangyt","download_url":"https://codeload.github.com/qiangyt/jog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiangyt%2Fjog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["convert","filter","json","log","structured"],"created_at":"2026-01-14T20:41:06.746Z","updated_at":"2026-01-14T20:41:07.387Z","avatar_url":"https://github.com/qiangyt.png","language":"Go","funding_links":[],"categories":["json"],"sub_categories":[],"readme":"# jog\n\n[![Build Status](https://app.travis-ci.com/qiangyt/jog.svg?branch=master)](https://api.travis-ci.com/qiangyt/jog.svg?branch=master)\n[![GitHub release](https://img.shields.io/github/v/release/qiangyt/jog.svg)](https://github.com/qiangyt/jog/releases/latest)\n[![Coverage Status](https://coveralls.io/repos/github/qiangyt/jog/badge.svg?branch=master)](https://coveralls.io/github/qiangyt/jog?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/qiangyt/jog)](https://goreportcard.com/report/github.com/qiangyt/jog)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Releases Download](https://img.shields.io/github/downloads/qiangyt/jog/total.svg?logo=github)](https://somsubhra.github.io/github-release-stats/?username=qiangyt\u0026repository=jog)\n\nCommand line tool to on-the-fly convert and view structured(JSON) log as regular flat line format. Jog supports follow mode like 'tail -f', as well as filtering by log level and time range.\n\n## Background\n\nStructured log, AKA. JSON line log, is great for log collectors but hard to read by developers themselves during local development. Jog helps to on-the-fly convert those structured JSON log to traditional flat line log. It then decreases the need to have environment-specific output formats - for ex. we don't need any more to configure JSON log for test / production but flat line log for local development.\n\nExtra feature includes filtering by log level, by time ranage, helpful for daily local development as well.\n\n## Features\n\n   Feature request is welcomed, for ex. new JSON log format. Submit issue for that please.\n\n   - [x] Support various of formats out-of-box and without customization.\n         Verified includes (submit issue for new one):\n      - [x] Logstash\n      - [x] GOLANG Uber zap (https://github.com/uber-go/zap)\n      - [x] Node.js Bunyan (https://github.com/trentm/node-bunyan)\n      - [ ] Node.js Winston (https://github.com/winstonjs/winston)\n      - [ ] Logrus\n      - [ ] AWS CloudWatch Logs\n\n   - [x] Follow mode like `tail -f`, with optional beginning from latest specified lines like `tail -n`.\n         (see example #1 and #2)\n\n   - [x] Read from stdin (stream) or local file\n\n   - [ ] Straightforward filtering:\n      - [x] by log level (see example #6)\n      - [x] by absolute time range (see example #7)\n      - [x] by relative time range (see example #8)\n      - [ ] show surrounding logs\n\n   - [x] output the raw JSON but then able to apply filters (see example #9)\n\n   - [x] Support JSON log mixed with non-JSON text, includes:\n      - [x] Mixed with regular flat log lines, for ex., springboot banner, and PM2 banner\n      - [x] Extra non-JSON prefix, followed by JSON log, for ex., docker-compose multi-services log\n\n   - [x] Supports nested escaped JSON value (escaped by `\\\"...\\\"`)\n\n   - [x] Compressed logger name - only first letters of package names are outputed\n\n   - [x] Print line number as line prefix\n\n   - [x] Customizable although usually you no need it.\n         Run `jog -t` to export default configuration, or see [./static_files/DefaultConfiguration.yml](./static_files/DefaultConfiguration.yml)\n      - [x] Output pattern\n      - [x] Hightlight startup line\n      - [x] Colorization\n      - [x] Print unknown fields as 'others'\n      - [x] For fields that not explictly in output pattern, print as 'others'\n      - [x] Show/hide fields\n\n   - [x] A GOLANG application, so single across-platform executable binary, support Mac OSX, Windows, Linux.\n\n## Usage:\n  Download the executable binary (https://github.com/qiangyt/jog/releases/) to $PATH.\n\n  - Windows\n    Download https://github.com/qiangyt/jog/releases/download/v1.0.3/jog.exe, copy it to your executable path\n\n  - Linux\n\n  ```shell\n     sudo curl -L https://github.com/qiangyt/jog/releases/download/v1.0.3/jog.linux -o /usr/local/bin/jog\n     sudo chmod +x /usr/local/bin/jog\n  ```\n\n  - Mac OSX (x86_64)\n\n  ```shell\n     sudo curl -L https://github.com/qiangyt/jog/releases/download/v1.0.3/jog.darwin_amd64 -o /usr/local/bin/jog\n     sudo chmod +x /usr/local/bin/jog\n  ```\n\n  - Mac OSX (arm64)\n\n  ```shell\n     sudo curl -L https://github.com/qiangyt/jog/releases/download/v1.0.3/jog.darwin_arm64 -o /usr/local/bin/jog\n     sudo chmod +x /usr/local/bin/jog\n  ```\n\n   * View a local JSON log file: `jog sample.log`\n\n     Or follows begining from latest 20 lines: `jog -n 20 -f sample.log`\n\n   * Follow stdin stream, for ex. docker: `docker logs -f my.container | ./jog -n 20`\n\n   * Check full usage: `jog -h`\n\n      ```\n      Usage:\n        jog  [option...]  \u003cyour JSON log file path\u003e\n           or\n        \u003cstdin stream\u003e  |  jog  [option...]\n\n      Examples:\n\t     1) follow with last 10 lines:         jog -f app-20200701-1.log\n\t     2) follow with specified lines:       jog -n 100 -f app-20200701-1.log\n\t     3) with specified config file:        jog -c another.jog.yml app-20200701-1.log\n\t     4) view docker-compose log:           docker-compose logs | jog\n\t     5) print the default template:        jog -t\n\t     6) only shows WARN \u0026 ERROR level:     jog -l warn -l error app-20200701-1.log\n\t     7) shows with timestamp range:        jog --after 2020-7-1 --before 2020-7-3 app-20200701-1.log\n\t     8) natural timestamp range:           jog --after \"1 week\" --before \"2 days\" app-20200701-1.log\n\t     9) output raw JSON and apply time range filter:      jog --after \"1 week\" --before \"2 days\" app-20200701-1.log --json\n\t     10) disable colorization:             jog -cs colorization=false app-20200701-1.log\n\t     11) view apache log, non-JSON log     jog -g COMMONAPACHELOG example_logs/grok_apache.log\")\n\n      Options:\n        -a,  --after \u003ctimestamp\u003e                                    'after' time filter. Auto-detect the timestamp format; can be natural datetime\n        -b,  --before \u003ctimestamp\u003e                                   'before' time filter. Auto-detect the timestamp format; can be natural datetime\n        -c,  --config \u003cconfig file path\u003e                            Specify config YAML file path. The default is .jog.yaml or $HOME/.jog.yaml\n        -cs, --config-set \u003cconfig item path\u003e=\u003cconfig item value\u003e    Set value to specified config item\n        -cg, --config-get \u003cconfig item path\u003e                        Get value to specified config item\n        -d,  --debug                                                Print more error detail\n        -f,  --follow                                               Follow mode - follow log output\n        -g,  --grok \u003cgrok pattern name\u003e                             For non-json log line. The default patterns are saved in [~/.jog/grok_vjeantet, ~/.jog/grok_extended]\n        -j,  --json                                                 Output the raw JSON but then able to apply filters\n        -h,  --help                                                 Display this information\n        -l,  --level \u003clevel value\u003e                                  Filter by log level. For ex. --level warn\n        -n,  --lines \u003cnumber of tail lines\u003e                         Number of tail lines. 10 by default, for follow mode\n             --reset-grok-library-dir                               Save default GROK patterns to [~/.jog/grok_vjeantet, ~/.jog/grok_extended]\n        -t,  --template                                             Print a configuration YAML file template\n        -V,  --version                                              Display app version information\n     ```\n\n## Build\n\n   *  Install GOLANG version \u003e= 1.16\n   *  Install\n      - [goreportcard-cli](https://github.com/gojp/goreportcard)\n      - [gometalinter](https://github.com/alecthomas/gometalinter)\n      - go install github.com/golang/mock/mockgen@v1.6.0\n   *  In current directory, run `./build.sh`\n\n## Status\n\n   Not yet ready for first release, still keep refactoring and fixing and adding new features. I create pre-release even for single bug fix or small feature. I won't test much before version 1.0 is ready.\n   Just feel free to use it since it wouldn't affect something.\n\n## TODO\n\n   * version 1.0 TODO\n     - unit test coverage: \u003e= 80%\n     - manual test suite\n     - aggregate Kubernetes Pods logs\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiangyt%2Fjog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiangyt%2Fjog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiangyt%2Fjog/lists"}