35 lines
566 B
Markdown
35 lines
566 B
Markdown
# rotate-puts
|
|
|
|
Rotate outputs from std in or assigned file
|
|
|
|
Usage:
|
|
|
|
```shell
|
|
command | rotate-puts
|
|
```
|
|
|
|
Use `mkfifo`:
|
|
|
|
```shell
|
|
mkfido test-fifo
|
|
rotate-puts --file test-fifo
|
|
command > test-fifo
|
|
```
|
|
|
|
Run as daemon:
|
|
|
|
```shell
|
|
rotate-put --file test-fifo --daemon --iden test [--continue-read]
|
|
```
|
|
|
|
For nginx:
|
|
|
|
```shell
|
|
mkfifo access.log
|
|
mkfifo error.log
|
|
```
|
|
|
|
```shell
|
|
./rotate-puts --daemon --file access.log --prefix nginx_access --continue-read --ident nginx_access
|
|
./rotate-puts --daemon --file error.log --prefix nginx_error --continue-read --ident nginx_error
|
|
``` |