- Notifications
You must be signed in to change notification settings - Fork35
Powerful terminal based viewer for JSON logs using ncurses.
gistia/json-log-viewer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Powerful terminal based viewer for JSON logs using ncurses.
json-log-viewer is a feature intensive viewer and analyze tool for JSON logs created by libraries likehttps://github.com/winstonjs/winston.
Features:
- completely operated by hotkeys
- powerful command line arguments
- sort by timestamp, level or message
- filter by any field or metadata
- search
Hotkeys:
arrows
andpage up/down
to move/
to searchn
to search agains
to sortf
to filterl
to filter by levelg
to go to line0
to go to first line$
to go to last lineq
to quit
npm install --global json-log-viewer
jv application.log.2017-01-01 --sort -timestamp
The default expected log format include fieldstimestamp
,level
andmessage
. If the log file you're trying to parse doesn't include those fields, you can create a config file on your HOME path called.json-log-viewer
.
For example, if your log lines look like this:
{"message":"Matched route\"**_heartbeat_check\" (parameters:\"_controller\":\"**\\Controller\\**Controller::heartbeatCheckAction\",\"_route\":\"**_heartbeat_check\")","context": [],"level":200,"level_name":"INFO","channel":"request","datetime": {"date":"2017-12-06 09:23:42.253060","timezone_type":3,"timezone":"Europe/Berlin" },"extra": []}
You can create a mapping configuration like this:
[transform]level=level_nametimestamp=datetime.datemessage=messageextra=$
This way the messages will properly be displayed. The$
has a special meaning: it tells the the old object should be included on theextra
key on the resulting JSON. The result will look like this:
Details view
Filters
Log level selection
About
Powerful terminal based viewer for JSON logs using ncurses.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.