-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,73 @@ | ||
# jog | ||
Convert and view structured (JSON) log | ||
|
||
UNDER EARLY DEVELOPMENT. DON'T USE FOR NOW. | ||
|
||
## Feature request is welcomed, for ex. new JSON log format. Submit issue for that please. | ||
## Background | ||
|
||
## Planned Features | ||
Structured log, AKA. JSON line log, is great for log collectors but hard to read for developers themselves, usually during local development. This tool helps to on-the-fly convert those structured JSON log to traditional space-separated line log, friendly for developers. It then removes the effort to maintenain different output format for different environments (for ex. JSON log for test / production, but line log for local development). | ||
|
||
- [ ] Supported many formats: | ||
## Features | ||
|
||
- [x] logstash | ||
- [ ] zap | ||
- [ ] bunyan | ||
- [ ] will add more | ||
Feature request is welcomed, for ex. new JSON log format. Submit issue for that please. | ||
|
||
- [ ] Customizable colorization (not yet supports windows) | ||
- [ ] Supports as many as possible formats: | ||
|
||
- [ ] able to directly read many sources: | ||
- [x] stdin | ||
- [x] local file | ||
- [ ] remote file (HTTP/HTTPs/FTP/SFTP) | ||
- [ ] k8s log | ||
- [ ] docker-compose log | ||
- [ ] docker log | ||
- [ ] aggregate multiple log | ||
- [x] Logstash | ||
- [ ] Uber zap | ||
- [ ] Bunyan | ||
- [x] Actually you could define your own format. Run `jog -t` to see configuration example. Most-likely your JSON log format is already supported, automatically | ||
|
||
- [ ] Friendly to multi-containers log outputted by docker-compose | ||
- [x] Supports customized fields | ||
|
||
- [x] Customizable output format | ||
- [x] Customizable output pattern | ||
|
||
- [x] Hightlight startup line | ||
- [x] Customizable output colorization | ||
|
||
- [x] Compressed logger name - only first letters of package names are outputed | ||
- [x] Hightlight startup line | ||
|
||
- [x] Support JSON log mixed with non-JSON log line (for ex., springboot banner) - directly print them | ||
- [x] Support JSON log mixed with non-JSON log line (for ex., springboot banner) - just directly print them | ||
|
||
- [ ] Filtering, both command line and embedded Web UI | ||
- [ ] Able to directly read many sources: | ||
- [x] stdin & stream | ||
- [x] local file | ||
- [ ] remote file (HTTP/HTTPs/FTP/SFTP) | ||
- [ ] k8s log | ||
- [ ] docker-compose log | ||
- [ ] docker log | ||
- [ ] aggregate multiple log | ||
|
||
- [ ] Friendly to multi-containers log outputted by docker-compose | ||
|
||
- [x] Compressed logger name - only first letters of package names are outputed | ||
|
||
- [ ] Filtering, both command line and embedded Web UI | ||
|
||
|
||
## Executable binaries: | ||
|
||
https://github.com/qiangyt/jog/releases/ | ||
|
||
## Usage: | ||
Copy the downloaded binary to $PATH. For ex. | ||
|
||
```shell | ||
cp jog /usr/local/bin/ | ||
``` | ||
|
||
* View a local JSON log file: `jog sample.log` | ||
|
||
* From stdin: `cat sample.log | ./jog` | ||
|
||
* From stdin steam: `tail -f sample.log | ./jog` | ||
|
||
* Check full usage: `jog -h` | ||
|
||
## Build | ||
|
||
* Install GOLANG | ||
|
||
* In current directory, run `./build.sh` | ||
|
||
## License | ||
|
||
[MIT](/LICENSE) |