diff --git a/README.md b/README.md new file mode 100644 index 0000000..405f465 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# Clio A simple log redirector for stdout and stderr. + +Clio redirects stdout and stderr for a subprocess to paths of your choosing. +When sent a configurable signal, SIGHUP by default, it will reopen the file +handles that it is redirecting the output to. + +This is handy for use with logrotate or or other log rotation tools where they +can inform the clio that the logs have been rotated and it's file handles are +stale. + +```sh +$> clio --help +A small log redirection utility + +Usage: clio [OPTIONS] --err-path --out-path [-- ...] + +Arguments: + [CMD]... Command to run + +Options: + -e, --err-path Path to write stderr to + -o, --out-path Path to write stdout to + --sig Signal notifiying that the file paths have been rotated [default: sighup] [possible values: sighup, sigusr1, sigusr2] + -h, --help Print help + -V, --version Print version +``` + +## Example + +```sh +clio --err-path /var/log/app.err.log --out-path /var/log/app.out.log --sig sighup -- app --flag1 --flag2 +```