log-to-json-cli

Yet another CLI to convert log files to JSON

Usage no npm install needed!

<script type="module">
  import logToJsonCli from 'https://cdn.skypack.dev/log-to-json-cli';
</script>

README

log-to-json-cli

A handy CLI to convert log files to JSON using log-to-json module.

Install

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.

CLI Usage

➜  gith 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

Example

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

Need API?

Refer log-to-json module.


Licence

MIT © Vajahath Ahmed