Logging via stdin
Is there a logging / log rotation tool which allows me to pipe output into it and it will log it in a particular way? Basically what I'm looging for would have an interface something like the following
Code:
$ ./run_my_tool | stdin2log --path=/path/to/logs --rotate=10 --compress Code:
$ ./run_my_tool | stdin2log --file=/path/to/logs/number%dfile --rotate=10 --compress=bz2 |
Code:
#!/bin/bash Code:
stdin2log -c "seq 1 100" -l /var/log/name.log |
Very cool script! It's not quite what I'm looking for but it certainly shown me that implementing what I need will be a hell of a lot simpler than I'd imagined. Thanks.
|
Post your script when you're done?
|
This is what I've put together, much easier that what I had first envisioned. Thanks for your help unSpawn.
Code:
#!/bin/bash |
All times are GMT -5. The time now is 05:28 AM. |