fblog-2.0.0 is not a library.

[[./logo/fblog_small.png]]

  • fblog

    [[https://crates.io/crates/fblog][file:https://img.shields.io/crates/v/fblog.svg]] [[https://travis-ci.org/brocode/fblog][file:https://travis-ci.org/brocode/fblog.svg?branch=master]]

    A small tool to view json log files.

    [[file:demo.png]]

** Filter To filter log messages it is possible to use lua

#+BEGIN_SRC shell-script fblog -f 'level ~= "info"' # will print all message where the level is not info fblog -f 'process == "play"' # will print all message where the process is play fblog -f 'string.find(fu, "bow.*") ~= nil' # will print all messages where fu starts with bow fblog -f 'process == "play"' # will print all message where the process is play fblog -f 'process == "rust" and fu == "bower"' fblog --no-implicit-filter-return-statement -f 'if 3 > 2 then return true else return false end'

not valid lua identifiers

fblog -d -f '_G["log.level"] == "WARN"' sample_elastic.log #+END_SRC

** Customize fblog tries to detect the message, severity and timestamp of a log entry. This behavior can be customized. See --help for more information.

You can customize fblog messages: Format output: #+BEGIN_SRC shell-script fblog -p --main-line-format "{{#if short_message}}{{ red short_message }}{{/if}}" sample.json.log #+END_SRC

The following sanitized variables are provided by fblog:

  • fblog_timestamp
  • fblog_level
  • fblog_message
  • fblog_prefix

For the default formatting see --help

handlebar helpers:

  • bold
  • yellow
  • red
  • blue
  • purple
  • green
  • color_rgb 0 0 0
  • uppercase
  • level_style
  • fixed_size 10

** NO_COLOR fblog disables color output if the NO_COLOR environment variable is present.

[[https://no-color.org/][no-color]]

** Installation #+BEGIN_SRC bash cargo install fblog #+END_SRC

If you need a deb or rpm package have a look at [[https://github.com/brocode/fblog/releases][fblog releases]]

If you're lucky enough to be an arch linux user: [[https://aur.archlinux.org/packages/fblog/][AUR]]