json-log-viewer

module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT

README

JSON Log Viewer

Version Build Status Go Report Card Coverage Status

It is an interactive tool for viewing and analyzing complex log files with structured JSON logs.

Animation

Main features:

  1. It is interactive.
  2. Is shows similified log records.
  3. It is possible to see the full prettified JSON after clicking.
  4. It includes non-JSON logs as they are.
  5. It understands different field names.
  6. It supports case-insensitive filtering.
  7. It is simple.

It uses antonmedv/fx for viewing JSON and charmbracelet/bubbletea for terminal UI. The tool is inspired by the project json-log-viewer which is unfortunately outdated.

Table of content

Usage

jlv file.json
Key Action
Enter Open/Close log
F Filter
Ctrl+C Exit
Esc Back
↑↓ Navigation

Install

MacOS/Linux HomeBrew
brew install hedhyw/main/json-log-viewer
Go
go install github.com/hedhyw/json-log-viewer/cmd/jlv@latest
Package

Latest DEB and RPM packages are available on the releases page.

Standalone Binary

Download latest archive *.tar.gz for your target platform from the releases page and extract it to /usr/local/bin/jlv. Add this path to PATH environment.

Source
git clone git@github.com:hedhyw/json-log-viewer.git
cd json-log-viewer
make build
cp ./bin/jlv /usr/local/bin
chmod +x /usr/local/bin/jlv

Roadmap

  • Accept stream of logs.
  • Add colors to log levels.
  • Add a configuration file (similar to .json-log-viewer).
  • Convert number timestamps.

Resources

Alternatives:

  • mightyguava/jl - Pretty Viewer for JSON logs.
  • pamburus/hl - A log viewer that translates JSON logs into human-readable representation.
  • json-log-viewer - Powerful terminal based viewer for JSON logs using ncurses.

License

MIT License.

Directories

Path Synopsis
cmd
jlv
internal
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL