1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-04 10:34:55 +02:00
lazygit/vendor/github.com/aybabtme/humanlog
2022-03-18 21:36:28 +11:00
..
.gitignore add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
docker_compose_handler.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
goreleaser.yaml add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
handler.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
json_handler.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
LICENSE.md add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
logfmt_handler.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
README.md add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
scanner.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
time_parse.go add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00

humanlog

Read logs from stdin and prints them back to stdout, but prettier.

Using it

Grab a release or :

With Go installed

$ go get -u github.com/aybabtme/humanlog/...

On linux

wget -qO- https://github.com/aybabtme/humanlog/releases/download/0.4.0/humanlog_Linux_x86_64.tar.gz | tar xvz

On OS X

brew tap aybabtme/homebrew-tap
brew install humanlog

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

2__fish___users_antoine_gocode_src_github_com_aybabtme_humanlog__fish_

Contributing

How to help:

  • support more log formats: by submitting human.Handler implementations.
  • live querying: add support for filtering in log output in real time.
  • charting: some key-values have semantics that could be charted in real time. For instance, durations, frequency of numeric values, etc. See the l2met project.

Usage

NAME:
   humanlog - reads structured logs from stdin, makes them pretty on stdout!

USAGE:
   humanlog [global options] command [command options] [arguments...]

VERSION:
   0.4.0

AUTHOR:
  Antoine Grondin - <antoine@digitalocean.com>

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --skip '--skip option --skip option'   keys to skip when parsing a log entry
   --keep '--keep option --keep option'   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 '15'     truncate values that are longer than this length
   --help, -h           show help
   --version, -v        print the version