log-to-json
Yet another transform stream to convert .log
files to .json
.
Install
Requires Node >=10.
From npm,
npm i log-to-json
From Github Package Registry. (Guide).
Type definitions are bundled with this package.
Usage
This module uses streams, so you can handle large files.
;// or; ; fs.createReadStream'my.log' .pipeconverter .pipefs.createWriteStream'my.log.json';
my.log
:
{"my": 5, "log":9, "file": "fsadf"}{"my": 5, "log":9, "file": "fsadf"}{"my": 5, "log":9, "file": "fsadf"}{"my": 5, "log":9, "file": "fsadf"}
my.log.json
:
Do not use this module if your your log files are not JSON like.
Licence
MIT © Vajahath Ahmed