spoovy has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Numeric values required in Unix::Syslog?
by toolic (Bishop) on Jan 19, 2015 at 17:58 UTC | |
by spoovy (Initiate) on Jan 20, 2015 at 09:29 UTC | |
|
Re: Numeric values required in Unix::Syslog?
by Anonymous Monk on Jan 19, 2015 at 18:15 UTC | |
by spoovy (Initiate) on Jan 20, 2015 at 09:43 UTC | |
by Anonymous Monk on Jan 20, 2015 at 11:31 UTC | |
by spoovy (Initiate) on Jan 21, 2015 at 10:00 UTC | |
|
Re: Numeric values required in Unix::Syslog?
by flexvault (Monsignor) on Jan 19, 2015 at 18:19 UTC |