I'm using Unix::Syslog to do the logging but I suspect my problem is related to perl rather than that module specifically. My code:Jan 19 10:29:09 mgmt yum[26377]: Installed: perl-Unix-Syslog-1.1-3.el6 +.x86_64
But what I get in syslog is this:use constant LOGINFO => 'LOG_INFO'; use constant LOGPID => 'LOG_PID'; # Open syslog channel openlog('my-program.pl', @{[ LOGPID ]}, 3); # Daemonise $daemon->Init(); syslog (@{[ LOGINFO ]}, "my-program.pl started and daemonised"); # Run the thing &main_function(); closelog();
..and the following error on starting the program:Jan 19 17:20:46 mgmt my-program.pl: my-program.pl started and daemonis +ed
It seems it want a numeric value, but is there a numeric value for LOG_PID? Also it seems I should be able to put text in here so I can specify multiple option rather than just one. Any help appreciated. spoovArgument "LOG_PID" isn't numeric in subroutine entry at ./my-program.p +l line 66.
In reply to Numeric values required in Unix::Syslog? by spoovy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |