JSON Log Viewer

It is an interactive tool for viewing and analyzing complex structured json-log files.

Main features:
- It is interactive.
- It displays a compact list of log entries.
- It is possible to expand the log and see the full prettified JSON tree.
- All non-json logs are captured.
- It understands different field names:
time
, timestamp
, msg
, message
, err
, error
etc.
- It supports case-insensitive filtering.
- Colorized log levels.
It uses antonmedv/fx for viewing JSON records and charmbracelet/bubbletea for organizing the terminal UI. The tool is inspired by the project json-log-viewer which is unfortunately outdated and deserted.
The application is designed to help in visualization, navigation, and analyzing of JSON-formatted log data in a user-friendly and interactive manner. It provides a structured and organized view of the JSON logs, making it easier to comprehend the hierarchical nature of the data. It uses collapsible/expandable tree structures, indentation, and color-coded syntax to represent the JSON objects and arrays. It is possible to search for specific keywords, phrases, or patterns within the JSON logs. So it helps to significantly simplify the process of working with JSON logs, making it more intuitive and efficient. It is easy to troubleshoot issues, monitor system performance, or gain a deeper understanding of the application's behavior by analyzing its log data in post-mortem.
Table of content
Usage
jlv file.json
Key |
Action |
Enter |
Open/Close log |
F |
Filter |
Ctrl+C |
Exit |
Esc |
Back |
↑↓ |
Navigation |
[↑] Click Up on the first row to reload the file.
Install
MacOS/Linux HomeBrew
brew install hedhyw/main/jlv
# jlv application.log
Go
go install github.com/hedhyw/json-log-viewer/cmd/jlv@latest
# jlv application.log
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
# jlv application.log
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.
Contribution
Check open unassigned issues, write comments, ask questions, fork, and create a pull request.
License
MIT License.