powerman has asked for the wisdom of the Perl Monks concerning the following question:
but it isn't working. I've found only one dirty hack to do this (after looking at Sys::Syslog source):use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock("stream", "/var/www/blah/log") or die $!; openlog "onliner", "pid", "user" or die $!; syslog "warning", "test=%d", 15;
Is there exists not so ugly way?use Sys::Syslog qw(:DEFAULT setlogsock); sub Sys::Syslog::_PATH_LOG {"/var/www/blah/log"} setlogsock("unix") or die "setlogsock: $!"; openlog "onliner", "pid", "user" or die "openlog: $!"; syslog "warning", "test: %d", 15;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sys::Syslog to my file
by PodMaster (Abbot) on May 23, 2004 at 13:12 UTC | |
by powerman (Friar) on May 23, 2004 at 14:05 UTC |