https://github.com/leolabs/read-json-log
A Deno script that allows you to view JSON logs in a more readable manner
https://github.com/leolabs/read-json-log
json logs ndjson winston
Last synced: 7 months ago
JSON representation
A Deno script that allows you to view JSON logs in a more readable manner
- Host: GitHub
- URL: https://github.com/leolabs/read-json-log
- Owner: leolabs
- License: mit
- Created: 2023-03-15T17:02:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T22:28:09.000Z (over 2 years ago)
- Last Synced: 2025-01-22T03:29:25.343Z (9 months ago)
- Topics: json, logs, ndjson, winston
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RJL (Read JSON Log)
A Deno script that allows you to view JSON logs in a more readable manner. Logs can
either be loaded from a file or by piping them to stdin.If you load multiple files at once, their lines are merged and each file is assigned
a separate color so you can differentiate them from each other.The script expects each log line to have a `module`, `timestamp`, and `message` field.
Optionally, if a `level` field is present, it will be used for highlighting lines.You can use the following options to filter logs:
```
Usage: rjl [options] [input-files...]Arguments:
input-files The files to processOptions:
-l, --level Only shows logs with the given level (default: [])
-s, --start-date Filters out all logs before this date
-e, --end-date Filters out all logs after this date
-m, --module Only shows logs from the given module (default: [])
-n, --not-module Hides logs from the given module (default: [])
-f, --filter Filters out logs where the message contains the given string (default: [])
--shallow Only show the first level of data keys
-h, --help display help for command
```## Installing RJL
RJL requires [Deno](https://deno.land) to be installed. You can then use
the following command to install the script:```sh
deno install --allow-read -n rjl https://deno.land/x/rjl/cli.ts
```