Re: Syslog compatible output from socklog
Gerrit Pape <[email protected]>
| Newsgroups | gmane.comp.misc.pape.general |
|---|---|
| Message-ID | <20050217140731.12950.qmail@e2939596bc860d.315fe32.mid.smarden.org> |
On Thu, Feb 17, 2005 at 12:40:31PM +0000, Lars Kellogg-Stedman wrote: > > If someone has a better solution, I'd love to hear it. > > For example, the problem with this solution (filtering the output to be > syslog compatible) is that it exposes a limitation in the socklog/svlogd > combination -- the "meta information" about a log message (the facility and > priority) is only available inline, so if you want to filter log messages > by facility, you can't strip this information out of the text. You could run your perl script as svlogd processor, this will affect the @4000* log files, but not the current log file. The facility and priority names then still can be used for pattern matching. E.g.: echo '!/bin/sock2sys' >>/var/log/socklog/main/config runsvctrl hup /var/service/socklog-unix/log Another glitch in your proposed solution is the | in log/run, which should be avoided, see http://cr.yp.to/daemontools/faq/create.html#runlog Regards, Gerrit.