jog command - github.com/qiangyt/jog - Go Packages

jog

command module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 14 Imported by: 0

README

jog

Convert and view structured (JSON) log

Background

Structured log, AKA. JSON line log, is great for log collectors but hard to read for developers themselves, usually during local development. This tool helps to on-the-fly convert those structured JSON log to traditional space-separated line log, friendly for developers. It then removes the effort to maintenain different output format for different environments (for ex. JSON log for test / production, but line log for local development).

Features

Feature request is welcomed, for ex. new JSON log format. Submit issue for that please.

  • Supports as many as possible formats:

    • Logstash
    • Uber zap
    • Bunyan
    • Actually you could define your own format. Run jog -t to see configuration example. Most-likely your JSON log format is already supported, automatically
  • Supports customized fields

  • Customizable output pattern

  • Customizable output colorization

  • Hightlight startup line

  • Support JSON log mixed with non-JSON log line (for ex., springboot banner) - just directly print them

  • Able to directly read many sources:

    • stdin & stream
    • local file
    • remote file (HTTP/HTTPs/FTP/SFTP)
    • k8s log
    • docker-compose log
    • docker log
    • aggregate multiple log
  • Friendly to multi-containers log outputted by docker-compose

  • Compressed logger name - only first letters of package names are outputed

  • Filtering, both command line and embedded Web UI

Executable binaries:

https://github.com/qiangyt/jog/releases/

Usage:

Copy the downloaded binary to $PATH. For ex.

   cp jog /usr/local/bin/
  • View a local JSON log file: jog sample.log

  • From stdin: cat sample.log | ./jog

  • From stdin steam: tail -f sample.log | ./jog

  • Check full usage: jog -h

Build

  • Install GOLANG

  • In current directory, run ./build.sh

License

MIT

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