pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to sense if Sys::Syslog's openlog() has already been called? I'm looking at the docs, and I don't see one.
I'm writing some generic verbosity/debugging stuff for all the little scripts I wind up writing, and I'd like my message handler to print warnings to syslog if my script already uses syslog. ...Maybe an example would make more sense:
if ( syslog_is_open() ) { syslog('info','This script uses syslog'); } else { print "This script does not use syslog\n"; }
So, my question is, how would you write the syslog_is_open() function used above?
Thanks!
--Pileofrogs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is syslog already open?
by shmem (Chancellor) on Mar 13, 2007 at 21:09 UTC | |
|
Re: Is syslog already open?
by grinder (Bishop) on Mar 13, 2007 at 20:18 UTC |