Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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