kexplo / pipe-logger

Log rotation of stdout & stderr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pipe-logger

Ruby Bash script for easy log rotation and formatting

(Ruby version is 200x faster than the original bash version)

# 10MB * 10 (default)
chatty_process | pipe-logger chatty.log

# 100MB * 5
chatty_process | pipe-logger -s 100m -n 5 chatty.log

# With timestamp
chatty_process | pipe-logger -s 100m -n 5 -t chatty.log

# Standard output & error with process substitution
chatty_process > >(pipe-logger chatty.out) 2> >(pipe-logger chatty.err)

About

Log rotation of stdout & stderr


Languages

Language:Ruby 68.7%Language:Shell 31.3%