pipe-logger

Crates.iopipe-logger
lib.rspipe-logger
version1.1.19
sourcesrc
created_at2018-09-11 21:14:06.029819
updated_at2023-11-13 14:09:03.945726
descriptionStores, rotates, compresses process logs.
homepagehttps://magiclen.org/pipe-logger
repositoryhttps://github.com/magiclen/pipe-logger
max_upload_size
id84236
size24,434
Magic Len (Ron Li) (magiclen)

documentation

README

Pipe Logger

CI

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 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

Examples

lovable_process | pipe-logger -r 10m -c 5 --compress mylog.txt
lovable_process > >(pipe-logger mylog.txt) 2> >(pipe-logger --err error-mylog.txt)

License

MIT

Commit count: 41

cargo fmt