Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vajahath/log-to-json-cli
Another handy CLI to convert log files to JSON
https://github.com/vajahath/log-to-json-cli
Last synced: about 13 hours ago
JSON representation
Another handy CLI to convert log files to JSON
- Host: GitHub
- URL: https://github.com/vajahath/log-to-json-cli
- Owner: vajahath
- License: mit
- Created: 2020-02-19T17:20:46.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T07:45:20.000Z (about 2 years ago)
- Last Synced: 2024-12-13T22:28:03.505Z (about 1 month ago)
- Language: JavaScript
- Size: 1.37 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# log-to-json-cli
A handy CLI to convert log files to JSON using [log-to-json](https://github.com/vajahath/log-to-json) module.
![](https://github.com/vajahath/log-to-json-cli/workflows/Build/badge.svg) [![](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
## Install
Requires Node >=10.
From npm,
```sh
npm i -g log-to-json-cli
```From [Github Package Registry](https://github.com/vajahath/log-to-json-cli/packages). ([Guide](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages)).
Type definitions are bundled with this package, just in case you need.
## CLI Usage
```bash
➜ log-to-json --help
Usage: log-to-json [options]An easy CLI tool to convert .log files to .json
Options:
-V, --version output the version number
-o, --output 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`):
```bash
➜ log-to-json sample._log
✔ Output file created at: /home/user/path/log-to-json/tests/sample._log.json
```With `-o` option
```bash
➜ 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](https://github.com/vajahath/log-to-json) module.
[![](https://img.shields.io/badge/built%20with-ts--np%203-lightgrey?style=flat-square)](https://github.com/vajahath/generator-ts-np)
## Licence
MIT © [Vajahath Ahmed](https://twitter.com/vajahath7)