https://github.com/dcoxall/fudge
CLI tool to convert logs to JSON
https://github.com/dcoxall/fudge
Last synced: about 2 months ago
JSON representation
CLI tool to convert logs to JSON
- Host: GitHub
- URL: https://github.com/dcoxall/fudge
- Owner: dcoxall
- Created: 2014-02-26T17:11:56.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-02T20:10:26.000Z (over 12 years ago)
- Last Synced: 2026-01-26T13:28:58.415Z (5 months ago)
- Language: Go
- Homepage:
- Size: 168 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fudge
Process logs quickly into JSON making it more convenient to pipe into your own scripts to filter
### Usage
fudge can accept inputs in a variety of ways.
1. stdin - `cat /var/logs/nginx/* | fudge`
2. arguments - `fudge /var/logs/nginx/access.log`
3. globs - `fudge /var/logs/nginx/*.log`
4. multiples - `fudge /var/logs/nginx/{error,access}*.log /src/example.org/logs/*`
fudge has a couple of options available:
- `--format, -f` switch to a different log format parser (default: nginx "common")
- `--gzip, -g` decompress gzip input files on the fly (like gzcat)
## Awesome combinations
My primary use case is to filter logs based on certain information. A good tool to use with fudge is [jq][0] as it allows you to filter and adjust JSON on the command line.
[0]: https://github.com/stedolan/jq
## Contributions
Currently I am looking for common log file formats. I still need to add Apache and many other types of log files into fudge to make it more useful to more people.
Happily accepting pull requests