jsontail

command module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

README

jsonTail

tail command for json log file

How to install

go get github.com/yoanm/jsonTail

jsonTail command will be available under $GOPATH/bin

Options

Following command will output available options

jsonTail --help
  • -date : will print line handling date in front of each processed lines
File
  • -f FILE_PATH : will open FILE_PATH and wait for update. Behaves like tail -f command
  • -F FILE_PATH : Same behavior than -f but file will be reopened if recreated. Behaves like tail -F command
Fields matching/exclusion

Fields matching or exclusion only work with objects

  • -only FIELD : will output only specified field. Multiple fields could be specified by using multiple -only.

    Field matching is made thanks to github.com/tidwall/gjson package.

    See github.com/tidwall/gjson path syntac for more information about paths

  • -exclude FIELD : will exclude specified field from output. Multiple fields could be specified by using multiple -exclude.

    Field matching is made thanks to github.com/tidwall/sjson package.

    See github.com/tidwall/sjson path syntac for more information about paths

Dependencies

Following external packages are used under the hood :

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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