| Otto J. Makela 2005-01-26, 8:55 am |
| "Karen Wieprecht" <karen.wieprecht@jhuapl.edu> wrote:
> 1. If you are using perl prior to version 5.6, something special had
> to be done to build syslog.ph in order to be able to use Sys::Syslog
> (you'll need to google to find these instructions)
Nope, I've tried this out on Solaris 5.8 with both perl 5.8.0 and
5.8.6; also, it worked when I tried it on a Solaris 5.9 (perl 5.6.1)
and a FC3 Linux (perl 5.8.5) machine; also, I wrote a almost identical
tester program in C and it worked fine.
I've Googled relevant keywords, to find several cursings about similar
problems, but no obvious workable solutions. Suggestions on what to try,
before I just give up and build a wrapper around /usr/bin/logger?
Summary: The following ultra-simple syslog test program seems to fail
on Solaris 5.8 (all perl version tried) for unknown (complex) reasons.
Followup-to: comp.lang.perl.modules
----
#!/usr/bin/perl -w
use strict;
$0 =~ s,^.*\/,,o;
sub LOG {
use Sys::Syslog;
openlog($0,'pid','mail');
syslog('info',@_) || die "error in syslog: $!\n";
}
LOG("mail informational message");
--
/* * * Otto J. Makela <om@iki.fi> * * * * * * * * * * * * * * * */
/* Phone: +358 40 765 5772, FAX: +358 42 7655772, ICBM: 60N 25E */
/* Mail: Mechelininkatu 26 B 27, FIN-00100 Helsinki, FINLAND */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * */
|