Re: redirect to syslog



Jim Gibson <jgibson@xxxxxxxxxxxxxxxxx> wrote in comp.lang.perl.misc:
> In article <1132597230.814493.91670@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, sbk
> <skendric@xxxxxxxxx> wrote:
>
> > hi,
> >
> > i have an application which insists on writing to its own log file,
> > rather than to syslog. rather than modifying the application, i would
> > like to intercept what it sends to this file and redirect it to syslog
>
> Then it will be necessary to modify that program. It is not possible,
> as far as I know, to externally change output to a regular file into
> output to a named pipe, unless there are some redirection tricks I
> don't know about.

Why on earth not? Instead of letting the program create its log file,
pre-create it as a named pipe and let the program pick it up. A demon
can listen on the read end and forward the info to syslog. No tricks
involved. I'm not saying it's the best solution, but it's certainly
possible.

[sensible alternatives snipped]

Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
.



Relevant Pages

  • redirect to syslog
    ... i have an application which insists on writing to its own log file, ... rather than to syslog. ... i'm imagining that i can write a program to do this ... ... would replace the application's logfile with a 'named pipe' and then ...
    (comp.lang.perl.misc)
  • redirect to syslog
    ... i have an application which insists on writing to its own log file, ... rather than to syslog. ... i'm imagining that i can write a program to do this ... ... would replace the application's logfile with a 'named pipe' and then ...
    (comp.os.linux.misc)
  • Re: [Repost] php log to own syslog file
    ... >> Im trying to figure out how to setup FreeBSD 5.3 to log ... >> php events to its own log file via syslog. ... the php function syslog(). ...
    (freebsd-questions)
  • Re: redirect to syslog
    ... i have an application which insists on writing to its own log file, ... rather than to syslog. ... like to intercept what it sends to this file and redirect it to syslog ... would replace the application's logfile with a 'named pipe' and then write a perl program to read from that named pipe ... ...
    (comp.lang.perl.misc)
  • Re: checking firewall traffic....?
    ... > need help with the syntax in the syslog to create the "iptraf" log file. ... kern.=info (thats kernDOT=info) /var/log/whatever.log ... If so, put a -j LOG --log-level 2 in your iptables logging line, ...
    (comp.os.linux.security)