K
Karen Wieprecht
I'm trying to get some data sent into the system log after processing it
with a perl program. the text processing works great, and if I send to
stdout, the messages come out as they are processed. However, I'm trying
to
send the messages to the system log with "use Sys::Syslog" and I am not
getting anything ...
1. I'm using perl 5.6
2. syslog.conf is configured to show *.notice
3. I have seen examples with different flavors of quotes ( " .vs. ') in
the setlogsock, openlog, and syslog commands. I tried both ways with no
effect.
Code snippit (not the full program):
use Sys::Syslog qwDEFAULT setlogsock);
setlogsock ("unix");
openlog ("audit", "ndelay,nowait", "local5");
while ( <> ) {
chomp;
$PRINT_STRING = $_;
syslog ("notice", " %s\n",$PRINT_STRING) ;
}
closelog ();
I never get a syntax error, but I don't get any of the messages into the
system log either . I can't get the syslog command to DO anything. the
syntax looks right compared to many samples of the code I've seen ... maybe
I'm missing something?
Any ideas? Help would be most appreciated.
Thanks,
Karen Wieprecht
with a perl program. the text processing works great, and if I send to
stdout, the messages come out as they are processed. However, I'm trying
to
send the messages to the system log with "use Sys::Syslog" and I am not
getting anything ...
1. I'm using perl 5.6
2. syslog.conf is configured to show *.notice
3. I have seen examples with different flavors of quotes ( " .vs. ') in
the setlogsock, openlog, and syslog commands. I tried both ways with no
effect.
Code snippit (not the full program):
use Sys::Syslog qwDEFAULT setlogsock);
setlogsock ("unix");
openlog ("audit", "ndelay,nowait", "local5");
while ( <> ) {
chomp;
$PRINT_STRING = $_;
syslog ("notice", " %s\n",$PRINT_STRING) ;
}
closelog ();
I never get a syntax error, but I don't get any of the messages into the
system log either . I can't get the syslog command to DO anything. the
syntax looks right compared to many samples of the code I've seen ... maybe
I'm missing something?
Any ideas? Help would be most appreciated.
Thanks,
Karen Wieprecht