Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magiclen/pipe-logger
Stores, rotates, compresses process logs.
https://github.com/magiclen/pipe-logger
cli pipe-logger rust
Last synced: 28 days ago
JSON representation
Stores, rotates, compresses process logs.
- Host: GitHub
- URL: https://github.com/magiclen/pipe-logger
- Owner: magiclen
- License: mit
- Created: 2018-09-11T20:54:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-26T03:06:00.000Z (about 1 year ago)
- Last Synced: 2024-10-08T14:24:36.081Z (2 months ago)
- Topics: cli, pipe-logger, rust
- Language: Rust
- Homepage:
- Size: 41 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pipe Logger
====================[![CI](https://github.com/magiclen/pipe-logger/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/pipe-logger/actions/workflows/ci.yml)
Stores, rotates, compresses process logs.
## Help
```
EXAMPLES:
pipe-logger /path/to/out.log # Store log into /path/to/out.log
pipe-logger /path/to/out.log -r 10M # The same as above, plus if its size is over than 10MB, it will be rotated and renamed
pipe-logger /path/to/out.log -r 10M -c 4 # The same as above, plus the max count of log files is 4. The oldest ones will be removed when the quota is exhausted
pipe-logger /path/to/out.log -r 10M -c 4 --compress # The same as above, plus the rotated log files are compressed by xzUsage: pipe-logger [OPTIONS]
Options:
-r, --rotate Rotate the log file
-c, --count Assign the max count of log files
--compress Compress the rotated log files
--err Re-output logs through stderr
--log-path The path that you want to store your logs [default: logfile.log]
-h, --help Print help
-V, --version Print version
```## Examples
```bash
lovable_process | pipe-logger -r 10m -c 5 --compress mylog.txt
``````bash
lovable_process > >(pipe-logger mylog.txt) 2> >(pipe-logger --err error-mylog.txt)
```## License
[MIT](LICENSE)