nice

command module
v0.0.0-...-3f62583 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 14 Imported by: 0

README

nice

Format JSON log to human-readable log

Usage

$ nice -h
  -f string
        Output format. Fields can be access by dot notation path, separated by comma (,)
  -files string
        List of path input log files, separated by comma (,)

Examples:
  $ nice --files 20190624.log -f time,msg
  $ myapp | nice -f time,level,msg
  $ myapp | nice --files 20190624.log,anotherlogfile.log -f time,level,msg

Build from source

Require Go >= 1.11 as I'm using go module as dependencies management.

$ go get -u -v github.com/lnquy/nice

Test example with log from both stdin and file.

# Build logstdin binary file
$ cd logstdin
$ go build -o logstdin.bin .
$ mv logstdin.bin ..
$ cd ..

# Build nice
$ go mod vendor
$ go build -o nice.bin .
$ ./logstdin.bin | ./nice.bin --files 20190624.log -f time,level,msg

License

This project is under the MIT License. See the LICENSE file for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL