mirror of
https://github.com/zaphar/clio.git
synced 2025-07-23 20:49:51 -04:00
docs: Add README
This commit is contained in:
parent
b3680173a7
commit
68b00831bc
32
README.md
Normal file
32
README.md
Normal file
@ -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 <STDERR_PATH> --out-path <STDOUT_PATH> [-- <CMD>...]
|
||||
|
||||
Arguments:
|
||||
[CMD]... Command to run
|
||||
|
||||
Options:
|
||||
-e, --err-path <STDERR_PATH> Path to write stderr to
|
||||
-o, --out-path <STDOUT_PATH> Path to write stdout to
|
||||
--sig <ROTATED_SIGNAL> 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
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user