Re: Piping output to a program
Daryl Tester <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
ed wrote: > I'd like to log tinydns to ./log/main/current, rotated as it is just > fine, but also send the same copy of that output to a program so that I > can log certain things to a mysql table. Use the "!processor" option, which will feed the current logfile in through stdin and record stdout to the final destination log file. This means that you'll need to use a tee-like process to get a duplicate of the data, and it also needs to be quick as logging will be paused while the processor script runs (if there's any chance that your mysql server could be down, it would be best to spool the log to a temporary file and fork the import process from the processor script in the background). -- Regards, Daryl Tester, Software Wrangler and Bit Herder, IOCANE Pty. Ltd. "Security is like an onion; if I cut one up and jam it in your eye you'll know all about it." -- Conversations with Colleagues.