glogv is a zerolog log viewer. It converts zerologs standard json tags (time
, level
, message
and error
) and makes them more pleasant to view in the console. The output is color coded depending on the log level of the message.
glogv currently only works on linux
.
go install github.com/cwbriscoe/glogv@latest
# this will 'cat' the file and display it in the console
glogv /path/to/file.log
# this will 'tail' the file
glogv -tail /path/to/file.log
# filter through grep to show only certain levels
glogv -tail /path/to/file.log | grep -e ERR -e WRN --color=never -a
# or
glogv -tail /path/to/file.log | awk 'match($2,/WRN|ERR/)'
glogv /path/to/file.log.gz
glogv -tail /path/to/file1.log /path/to/file2.log
glogv /path/to/file1.log.gz /path/to/file2.log.gz
# make sure your $GOPATH/bin is in your path
tail --follow=name /path/to/file.log | glogv
# or
cat /path/to/file.log | glogv
# etc