zlog

Gem Version Build Status

Logging configuration on top of ruby's logging gem (see github).

  • colorful default logging to stdout
  • supports continuous logging (eg progress indicators which you don't want to clutter your commandline)
  • added section and ok log types

requirements

  • gems:
    • logging

installation

From rubygems:

gem install zlog

From source:

gem build *.gemspec && gem install *gem

example

Code:

require "zlog"
Zlog.init_stdout loglevel: :debug

l = Logging.logger["main"]
l.section "log demonstration"
l.ok "ok me"
l.debug "debug me"
l.info "info me"
l.warn "warn me"
l.error "error me"
l.fatal "fatal me"

See the example folder for more.

utility

You can use zlog to read and format json-based log files:

cat file.log | zlog

It will print out a formatted representation of the log.

Example image in example/example.output.png