/
View dependency graph
Depends on
- dh-golang (dh-golang)
- golang-defaults (golang-any)
- golang-github-aybabtme-rgbterm (golang-github-aybabtme-rgbterm-dev)
- golang-github-blang-semver (golang-github-blang-semver-dev)
- golang-github-cli-safeexec (golang-github-cli-safeexec-dev)
- golang-github-fatih-color (golang-github-fatih-color-dev)
- golang-github-go-logfmt-logfmt (golang-github-go-logfmt-logfmt-dev)
- golang-github-kr-logfmt (golang-github-kr-logfmt-dev)
- golang-github-mattn-go-colorable (golang-github-mattn-go-colorable-dev)
- golang-github-mattn-go-isatty (golang-github-mattn-go-isatty-dev)
- golang-github-urfave-cli (golang-github-urfave-cli-dev)
- golang-testify (golang-github-stretchr-testify-dev)
- debhelper-compat, golang-connectrpc-connect-dev
Used by
README (full)
humanlog
Read logs from stdin and prints them back to stdout, but prettier.
Using it
On macOS
brew tap humanlogio/homebrew-tap
brew install humanlog
On linux (and macOS)
curl -L "https://humanlog.io/install.sh" | sh
Otherwise
Example
If you emit logs in JSON or in logfmt, you will enjoy pretty logs when those
entries are encountered by humanlog. Unrecognized lines are left unchanged.
$ humanlog < /var/log/logfile.log

Usage
NAME:
humanlog - reads structured logs from stdin, makes them pretty on stdout!
USAGE:
humanlog [global options] command [command options] [arguments...]
VERSION:
0.7.2+48f11b1
AUTHOR:
Antoine Grondin <[email protected]>
COMMANDS:
version Interact with humanlog versions
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--config value specify a config file to use, otherwise uses the default one
--skip value keys to skip when parsing a log entry
--keep value keys to keep when parsing a log entry
--sort-longest sort by longest key after having sorted lexicographically
--skip-unchanged skip keys that have the same value than the previous entry
--truncate truncates values that are longer than --truncate-length
--truncate-length value truncate values that are longer than this length (default: 15)
--color value specify color mode: auto, on/force, off (default: "auto")
--light-bg use black as the base foreground color (for terminals with light backgrounds)
--time-format value output time format, see https://golang.org/pkg/time/ for details (default: "Jan _2 15:04:05")
--ignore-interrupts, -i ignore interrupts
--message-fields value, -m value Custom JSON fields to search for the log message. (i.e. mssge, data.body.message) [$HUMANLOG_MESSAGE_FIELDS]
--time-fields value, -t value Custom JSON fields to search for the log time. (i.e. logtime, data.body.datetime) [$HUMANLOG_TIME_FIELDS]
--level-fields value, -l value Custom JSON fields to search for the log level. (i.e. somelevel, data.level) [$HUMANLOG_LEVEL_FIELDS]
--help, -h show help
--version, -v print the version
| dir | .github/ |
| dir | cmd/ |
| dir | debian/ |
| dir | internal/ |
| dir | pkg/ |
| dir | script/ |
| dir | test/ |
| dir | vendor/ |
| file | .gitignore |
| file | LICENSE.md |
| file | README.md |
| file | docker_compose_handler.go |
| file | e2e_test.go |
| file | go.mod |
| file | go.sum |
| file | goreleaser.yaml |
| file | handler.go |
| file | json_handler.go |
| file | json_handler_test.go |
| file | logfmt_handler.go |
| file | logs.txt |
| file | scanner.go |
| file | scanner_test.go |
| file | time_parse.go |
| file | time_parse_test.go |
| file | zap_development_handler.go |
| file | zap_development_handler_test.go |