Logfile Viewer

fblog – view and filter JSON logs

fblog is a command-line application for viewing JSON-formatted logs. It focuses on turning structured log records into more readable output while retaining access to the individual fields contained in each JSON object.

The program attempts to identify common elements such as the message, severity and timestamp automatically. You can also select specific fields for display and customize how output is formatted. Nested values are supported and can be referenced in formatting expressions, while a collection of Handlebars helpers provides text styling, colors, case conversion and size formatting.

Filtering is one of fblog’s more powerful features. Filters are written using Lua expressions, allowing conditions to operate on fields from each JSON record. Nested JSON objects are converted into Lua records and arrays become Lua tables, so filters can work with structured data rather than treating an entire log entry as an opaque line of text.

fblog can also handle prefixed output produced when tools such as Kubernetes utilities combine logs from multiple pods. It supports message placeholder substitution, configurable mappings for log levels and shell completion generation. The default severity levels include trace, debug, info, warn, error and fatal, with corresponding colorization.

This is free and open source software.

Key Features

  • Displays JSON-formatted log files.
  • Automatically detects common message, severity and timestamp fields.
  • Selects specific JSON fields for display.
  • Filters records using Lua expressions.
  • Supports nested JSON objects and arrays in filters.
  • Customizes output using Handlebars templates.
  • Provides text styling and color helpers.
  • Colorizes common log severity levels.
  • Maps custom log-level values to standard levels.
  • Handles prefixed logs from multiple Kubernetes pods.
  • Supports message placeholder substitution.
  • Reads continuous log streams through standard input.
  • Respects the NO_COLOR environment variable.
  • Generates shell completions.

Website: github.com/brocode/fblog
Support:
Developer: Patrick Haun
License: WTFPL License

fblog in action
Click image for full size

fblog is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Command-Line Log Filters, Highlighters and Watchers
tailspinHighlights log output automatically without predefined log formats
hlFilters, searches and highlights structured logs in the terminal
humanlogFormats structured logs into readable, colourised terminal output
fblogFormats and filters JSON logs using configurable fields and Lua expressions
LogalizeCustomisable log colouriser with regex patterns and themes
swatchMonitors log files and triggers actions when specified patterns match

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted