[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Problem with Sys::Syslog
System:
Linux facs.sdi.firm 2.0.34C49_SK #2 Wed Aug 25 19:29:08 EDT 1999 mips unknown
This is perl, version 5.005_03 built for mips-linux
DNS resolves locally and uses /etc/host.
This C program works:
#include <syslog.h>
main (argc,argv)
int argc;
char *argv[];
{ openlog("test", LOG_PERROR, LOG_LOCAL0);
syslog(LOG_ERR, "test messages");
closelog();
}
and this Perl program appears to work but does not
write to the log:
#!/usr/bin/perl -w
use Sys::Syslog;
openlog("tst:", LOG_PERROR, LOG_LOCAL0);
syslog(LOG_ERR, "test log messages");
closelog();
Both are executed by user root, from the same
directory.
The perl gives one warning:
Constant subroutine __need___va_list undefined at
/usr/lib/perl5/site_perl/5.005/mips-linux/stdarg.ph line 9.
which corresponds to this line:
undef(&__need___va_list) if defined(&__need___va_list);
and should not cause any problems that I can see.
The /etc/syslog.conf entry sends the data to /var/log/test,
which is only getting written to be the C program:
Jan 12 21:50:27 facs test:: test messages
Jan 12 21:51:32 facs test: test messages
Jan 12 21:54:33 facs test: test messages
Single stepping with perl -d ./tst does not show any
run time errors or warnings. The script appears to
execute correctly to the end.
Any suggestions?
------------------------------------------------------
Use Linux: A computer Dale Amon, CEO/MD
is a terrible thing Village Networking Ltd
to waste. Belfast, Northern Ireland
------------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]