0.2.2 • Published 2 years ago

munia-pretty-json v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

munia-pretty-json

Convert the JSON log into readable form with command line. JSON logs can also be viewed as gird/table form on console.

Installation

npm install -g munia-pretty-json

Example

JSON log records (app-log.json):

{"time":"2021-06-09T02:50:22Z","level":"info","message":"Log for pretty JSON","module":"init","hostip":"192.168.0.138","pid":123}
{"time":"2021-06-09T03:27:43Z","level":"warn","message":"Here is warning message","module":"send-message","hostip":"192.168.0.138","pid":123}

Run the commond munia-pretty-json on shell:

$ munia-pretty-json app-log.json

This turns the JSON to:

output

With this tool the main feature is template that prettifies easily the JSON. Here is an example of template:

$ munia-pretty-json  --template  '{module --color} - {level} - {message}'  app-log.json

output

Usage

Testing

npm test

License

Licensed under MIT.

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago