Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jessety/tail-json
Tail a file. If a line is JSON, pretty-print it. Otherwise, just print it. Basically just boilerplate.
https://github.com/jessety/tail-json
Last synced: 5 days ago
JSON representation
Tail a file. If a line is JSON, pretty-print it. Otherwise, just print it. Basically just boilerplate.
- Host: GitHub
- URL: https://github.com/jessety/tail-json
- Owner: jessety
- License: mit
- Created: 2020-10-23T13:41:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-17T16:03:00.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T01:55:03.345Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 511 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tail-json
Tail a file. If a line is valid JSON, parse and pretty-print it. Otherwise, just print it.
[![ci](https://github.com/jessety/tail-json/workflows/ci/badge.svg)](https://github.com/jessety/tail-json/actions)
## Install
Run `npm install` and `npm run build`, then `npm link`.
## Usage
```bash
tail-json /var/log/project-name/all.log
```Any lines that parse as valid JSON will be pretty-printed, any that don't will be printed normally.
![Screenshot](/doc/screenshot.png)
## License
MIT © Jesse Youngblood