{"id":19132688,"url":"https://github.com/blesswinsamuel/pretty-log","last_synced_at":"2026-05-18T14:11:37.700Z","repository":{"id":46616623,"uuid":"380577183","full_name":"blesswinsamuel/pretty-log","owner":"blesswinsamuel","description":"Parses JSON logs and shows them in a pretty format with colors easier to read","archived":false,"fork":false,"pushed_at":"2024-04-02T04:10:55.000Z","size":102,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-03T11:47:11.707Z","etag":null,"topics":["hacktoberfest","json","log","pretty"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/blesswinsamuel.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":"2021-06-26T19:01:20.000Z","updated_at":"2024-04-02T04:09:52.000Z","dependencies_parsed_at":"2024-06-21T03:18:45.420Z","dependency_job_id":"258ed5af-1324-4c66-b341-a4d9eaa8dbba","html_url":"https://github.com/blesswinsamuel/pretty-log","commit_stats":null,"previous_names":["blesswinsamuel/pretty-json-log"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blesswinsamuel%2Fpretty-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blesswinsamuel%2Fpretty-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blesswinsamuel%2Fpretty-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blesswinsamuel%2Fpretty-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blesswinsamuel","download_url":"https://codeload.github.com/blesswinsamuel/pretty-log/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240214081,"owners_count":19766261,"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":["hacktoberfest","json","log","pretty"],"created_at":"2024-11-09T06:19:22.508Z","updated_at":"2026-05-18T14:11:37.694Z","avatar_url":"https://github.com/blesswinsamuel.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pretty-log\n\npretty-log is a command-line utility that turns newline-delimited JSON logs into compact, readable, colorized output for local debugging.\n\nIt is designed to work well with mixed streams where some lines are JSON and some are plain text.\n\n## Quick Preview\n\nBefore:\n\n\u003cimg width=\"1228\" height=\"719\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ebd0c03-348d-4667-a771-2219dfd436df\" /\u003e\n\nAfter:\n\n\u003cimg width=\"1228\" height=\"870\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b4126194-beb0-4e61-a74f-44bbe6f339d5\" /\u003e\n\n## Features\n\n- Human-friendly formatting for structured JSON logs\n- Automatic handling for string and numeric log levels (including Pino's `10-60` scale)\n- Configurable field aliases for time, level, and message\n- Optional include/exclude controls for non-core fields\n- Optional field ordering for extra context\n- Readable multiline stack trace rendering\n- Safe passthrough for non-JSON lines and non-object JSON values\n\n## Installation\n\n### From GitHub\n\n```sh\ncargo install --git https://github.com/blesswinsamuel/pretty-log --branch main\n```\n\n### From source\n\n```sh\ngit clone https://github.com/blesswinsamuel/pretty-log.git\ncd pretty-log\ncargo install --path .\n```\n\n## Quick Start\n\n```sh\n./your-application | pretty-log\n```\n\nTry with included fixtures:\n\n```sh\ncat test/logs.txt | cargo run --quiet\ncat test/logs_pino.txt | cargo run --quiet -- --color never\n```\n\n## CLI Options\n\n```text\nUsage: pretty-log [OPTIONS]\n\nOptions:\n\t-t, --time-field \u003cTIME_FIELD\u003e        Field that represents time [default: time,timestamp]\n\t-l, --level-field \u003cLEVEL_FIELD\u003e      Field that represents level [default: level,lvl]\n\t-m, --message-field \u003cMESSAGE_FIELD\u003e  Field that represents message [default: message,msg]\n\t\t\t--include-fields \u003cINCLUDE_FIELDS\u003e\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Comma-separated non-core fields to include in output\n\t\t\t--exclude-fields \u003cEXCLUDE_FIELDS\u003e\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Comma-separated non-core fields to hide from output\n\t\t\t--field-order \u003cFIELD_ORDER\u003e      Comma-separated preferred order for non-core fields\n\t\t\t--color \u003cCOLOR\u003e                  Color mode: auto, always, never [default: auto]\n\t-h, --help                           Print help\n\t-V, --version                        Print version\n```\n\n## Examples\n\nHide noisy host/process fields:\n\n```sh\ncat test/logs_pino.txt | pretty-log --exclude-fields pid,hostname\n```\n\nShow only selected context fields:\n\n```sh\ncat test/logs_pino.txt | pretty-log --include-fields service,jobId,invoiceId --field-order service,jobId,invoiceId\n```\n\nForce plain output (no ANSI colors):\n\n```sh\ncat test/logs_pino.txt | pretty-log --color never\n```\n\n## Behavior\n\n- Invalid JSON lines are printed unchanged\n- Valid non-object JSON values are printed unchanged\n- Time/level/message fields are promoted to the log prefix\n- Remaining fields are rendered as `key=value` pairs\n- Multiline strings (for example stack traces) are rendered as indented blocks\n\n## Development\n\nRun local stream demo:\n\n```sh\ngo run test/test.go | cargo run\n```\n\nRun fixture tests:\n\n```sh\ntask test\n```\n\nRun full validation:\n\n```sh\ncargo fmt --check\ncargo clippy --all-targets -- -D warnings\ncargo test\n```\n\n## Releases\n\nRelease binaries are published via GitHub Actions on tag/release workflows.\n\n## Contributing\n\nContributions are welcome.\n\n1. Fork the repository\n2. Create a feature branch\n3. Add or update tests for your change\n4. Run validation locally\n5. Open a pull request with a clear description\n\n## License\n\nThis project is licensed under the terms of the MIT License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblesswinsamuel%2Fpretty-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblesswinsamuel%2Fpretty-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblesswinsamuel%2Fpretty-log/lists"}