A handy CLI to convert log files to JSON using log-to-json module.
Requires Node >=10.
From npm,
npm i -g log-to-json-cli
From Github Package Registry. (Guide).
Type definitions are bundled with this package, just in case you need.
➜ log-to-json --help
Usage: log-to-json [options] <input-log-file>
An easy CLI tool to convert .log files to .json
Options:
-V, --version output the version number
-o, --output <file> Relative or absolute file path. If not provided, a new
JSON file with similar name is created.
-h, --help output usage information
With out output file option (-o
):
➜ log-to-json sample._log
✔ Output file created at: /home/user/path/log-to-json/tests/sample._log.json
With -o
option
➜ log-to-json sample._log -o magic.json
✔ Output file created at: /home/qbuser/gith/log-to-json/tests/magic.json
Refer log-to-json module.
MIT © Vajahath Ahmed