{"id":19196022,"url":"https://github.com/acj/krapslog-rs","last_synced_at":"2025-08-19T22:32:35.199Z","repository":{"id":50240120,"uuid":"280982713","full_name":"acj/krapslog-rs","owner":"acj","description":"Visualize logs in your terminal: ▂▃▃▃▃▃▅▅▅▅▃▃▅▅▆▇","archived":false,"fork":false,"pushed_at":"2024-05-29T11:37:57.000Z","size":172,"stargazers_count":53,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-30T14:33:27.607Z","etag":null,"topics":["dataviz","logs","rust","sparklines","visualization"],"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/acj.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-07-20T01:21:18.000Z","updated_at":"2024-08-04T14:00:15.000Z","dependencies_parsed_at":"2023-11-27T16:01:07.749Z","dependency_job_id":"db6edfc7-e405-4695-8082-746120318c48","html_url":"https://github.com/acj/krapslog-rs","commit_stats":{"total_commits":137,"total_committers":4,"mean_commits":34.25,"dds":0.4817518248175182,"last_synced_commit":"a4590279a4c5ec84062f762b7b3d74a2843a3f42"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fkrapslog-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fkrapslog-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fkrapslog-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fkrapslog-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acj","download_url":"https://codeload.github.com/acj/krapslog-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230374126,"owners_count":18216042,"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":["dataviz","logs","rust","sparklines","visualization"],"created_at":"2024-11-09T12:12:15.073Z","updated_at":"2024-12-19T04:07:27.327Z","avatar_url":"https://github.com/acj.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# krapslog\n\n[![Actions Status](https://github.com/acj/krapslog-rs/workflows/CI/badge.svg)](https://github.com/acj/krapslog-rs/actions)\n[![Crates.io](https://img.shields.io/crates/v/krapslog.svg)](https://crates.io/crates/krapslog)\n\nVisualize a log file with [sparklines](https://en.wikipedia.org/wiki/Sparkline)\n\nWhen troubleshooting a problem with a production service, I often need to get the general shape of a log file. Are there any spikes? Was the load higher during the incident than it was beforehand? Does anything else stand out? Without tooling to help you, a large log file is little more than a blob of data. This tool is designed to quickly surface key features of the log — and then get out of your way.\n\n## Installing\n\n### Homebrew\n\n```\nbrew install acj/taps/krapslog\n```\n\n### From source\n\n```\ncargo install krapslog\n```\n\n## Usage\n\n```\n$ krapslog --help\nVisualize log files using sparklines\n\nUsage: krapslog [OPTIONS] [FILE]\n\nArguments:\n  [FILE]  Log file to analyze\n\nOptions:\n  -F, --format \u003cFORMAT\u003e            Timestamp format to match [default: %d/%b/%Y:%H:%M:%S%.f]\n  -m, --markers \u003cMARKERS\u003e          Number of time markers to display [default: 0]\n  -h, --height \u003cHEIGHT\u003e            Height (in lines) of the displayed sparkline [default: 1]\n  -c, --concurrency \u003cCONCURRENCY\u003e  Number of threads to use when processing large files (defaults to number of CPU cores) [default: 8]\n  -h, --help                       Print help\n  -V, --version                    Print version\n```\n\n## Examples\n\nGet the basic shape:\n\n```\n$ krapslog /var/log/haproxy.log \n▂▂▂▂▂▁▂▁▁▁▁▂▁▁▁▁▂▂▂▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂▂▂▂▃▂▂▂▃▂▂▂▂▃▃▃▃▃▄▅▅▅▄▅▃▄▃▄▄▅▅▆▇▆▆▆▆▆▆▆▆▇▇▇▇██\n```\n\nAdd points in time:\n\n```\n$ krapslog --markers 10 /var/log/haproxy.log\n                                                             Sat Nov 23 14:15:56\n                                                    Sat Nov 23 13:22:29        |\n                                           Sat Nov 23 12:29:01        |        |\n                                  Sat Nov 23 11:35:33        |        |        |\n                          Sat Nov 23 10:48:02       |        |        |        |\n                                            |       |        |        |        |\n▂▂▂▂▂▁▂▁▁▁▁▂▁▁▁▁▂▂▂▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂▂▂▂▃▂▂▂▃▂▂▂▂▃▃▃▃▃▄▅▅▅▄▅▃▄▃▄▄▅▅▆▇▆▆▆▆▆▆▆▆▇▇▇▇██\n|        |        |       |        |\n|        |        |       |        Sat Nov 23 09:54:34\n|        |        |       Sat Nov 23 09:01:07\n|        |        Sat Nov 23 08:13:36\n|        Sat Nov 23 07:20:08\nSat Nov 23 06:26:40\n```\n\nIncrease the display resolution:\n\n```\n$ krapslog --height 5 /var/log/haproxy.log\n                                                                                        ▁           ▁  ▁▃▃██\n                                                                                    ▁ ▁▅█▃▅▂▂▄▃▃▅▅▇▆█▇██████\n                                                                     ▁▆▅▇▅▃▆▇  ▁ ▁▁▄█▇██████████████████████\n                                            ▁▁ ▁▂ ▅▂  ▂▃▂▁ ▃▁ ▂▂▅▅▂▄▅████████▇▆█▅███████████████████████████\n▇▇▇▆▇▇▅▅▆▅▅▄▃▄▄▇▄▆▃▅▄▅▅▆▅▅▃▁▁▃▃▄▄▄▃▄▅▅▆█▅▅▇▅██▇██████▇████▇█████████████████████████████████████████████████\n```\n\nIntegrate with other tools:\n\n```\n$ zcat /var/log/haproxy.log.1.gz | grep -v \"unimportant.html\" | krapslog\n▂▁▂▁▂▁▂▂▂▁▃▁▁▁▁▁▁▁▁▁▁▁▂▂▁▁▂▃▂▂▃▁▂▁▂▂▂▂▁▂▁▂▄▂▂▂▂▂▂▂▃▂▂▂▂▄▃▃▄▃▃▃▃▄▄▄▄▄▃▄▄▅▄▃▄▄▅▅▅▅\n```\n\n## Custom date formats\n\nBy default, krapslog assumes that log timestamps are in the [Common Log Format (CLF)](https://httpd.apache.org/docs/1.3/logs.html#common), which looks like this: \"02/Jan/2006:15:04:05.000\" (timezone offset is ignored). However, you can use the `format` parameter to find timestamps in other formats. The parameter value must use a format that's recognized by [strftime](https://docs.rs/chrono/0.4.13/chrono/format/strftime/index.html).\n\nFor example, if your log contains dates that look like  \"Jan 1, 2020 15:04:05\", you can run krapslog as follows:\n\n```\nkrapslog --format \"%b %d, %Y %H:%M:%S\" ...\n```\n\n### Currently supported specifiers\n\n| Specifier | Meaning |\n| --------- | ------- |\n| %Y        | The full proleptic Gregorian year, zero-padded to 4 digits. |\n| %C        | The proleptic Gregorian year divided by 100, zero-padded to 2 digits. |\n| %y        | The proleptic Gregorian year modulo 100, zero-padded to 2 digits. |\n| %m        | Month number (01--12), zero-padded to 2 digits. |\n| %b        | Abbreviated month name. Always 3 letters. |\n| %B        | Full month name. Also accepts corresponding abbreviation in parsing. |\n| %h        | Same as %b. |\n| %d        | Day number (01--31), zero-padded to 2 digits. |\n| %H        | Hour number (00--23), zero-padded to 2 digits. |\n| %M        | Minute number (00--59), zero-padded to 2 digits. |\n| %S        | Second number (00--60), zero-padded to 2 digits. |\n| %.f       | Similar to .%f but left-aligned. These all consume the leading dot. |\n| %s        | UNIX timestamp. Seconds since 1970-01-01 00:00 UTC. |\n\n## Contributing\n\nPlease be kind. We're all trying to do our best.\n\nIf you find a bug, please open an issue. (Or, better, submit a pull request that fixes it!)\n\nIf you'd like see a new feature or would like to add one yourself, please open an issue so that we can discuss it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facj%2Fkrapslog-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facj%2Fkrapslog-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facj%2Fkrapslog-rs/lists"}