Subject: | Sys::Syslog doesn't work on opensolaris |
Date: | Fri, 27 Nov 2009 19:04:18 +0100 |
To: | bug-Sys-Syslog [...] rt.cpan.org |
From: | Gérard Henry <Gerard.Henry [...] cmi.univ-mrs.fr> |
hello,
i've a big trouble with this module, because the application i use never
writes to syslog system.
First, i read the bug:
http://rt.cpan.org/Public/Bug/Display.html?id=40305
So my system displays:
# perl -MSys::Syslog -wle'print $Sys::Syslog::VERSION'
0.27
as you can see, it is the latest release.
The, i use the C file you gave in the bug 40305, and it works:
cat test_syslog.c
#include <syslog.h>
int main(void) {
openlog("tester", LOG_NDELAY, LOG_USER);
syslog(LOG_LOCAL6|LOG_INFO, "another syslog test (from C)");
closelog();
return 0;
}
./test_syslog
and in /var/log/syslog:
Nov 27 18:54:32 catalogue4 tester: [ID 231973 local6.info] another
syslog test (from C)
Now, i did some tests with perl code:
perl -MSys::Syslog -e 'Sys::Syslog::syslog("local6|info", "this is a
better test: %d", time);'
perl -MSys::Syslog -e 'Sys::Syslog::syslog(LOG_INFO, "this is a better
test: %d", time);'
but:
perl -MSys::Syslog -e 'Sys::Syslog::syslog(LOG_INFO|LOG_LOCAL6, "this is
a better test: %d", time);'
syslog: invalid level/facility: LOG_MOGOL6 at -e line 1
I'm actually using perl 5.8.8
Could you help me?
thanks in advance,
gerard
--
Gerard HENRY
LATP UMR6632
39, rue F. Joliot Curie
13453 MARSEILLE Cedex 13
Tel.: 04 91 11 35 85 Fax.: 04 91 11 35 52