21 个稳定版本
1.1.19 | 2023年11月13日 |
---|---|
1.1.16 | 2023年6月29日 |
1.1.14 | 2022年3月18日 |
1.1.13 | 2021年4月22日 |
1.1.5 | 2018年9月13日 |
在 调试 类别中排名第 177
每月下载量 133
8KB
86 行代码(不包括注释)
管道日志记录器
存储、轮转、压缩进程日志。
帮助
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 xz
Usage: pipe-logger [OPTIONS]
Options:
-r, --rotate <ROTATE> Rotate the log file
-c, --count <COUNT> Assign the max count of log files
--compress Compress the rotated log files
--err Re-output logs through stderr
--log-path <LOG_PATH> The path that you want to store your logs [default: logfile.log]
-h, --help Print help
-V, --version Print version
示例
lovable_process | pipe-logger -r 10m -c 5 --compress mylog.txt
lovable_process > >(pipe-logger mylog.txt) 2> >(pipe-logger --err error-mylog.txt)
许可协议
依赖项
~8–18MB
~252K SLoC