Skip to content

lnquy/nice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages