Subject: | setlogsock('stream') not work under Solaris |
Hi,
I have trouble using the Sys::Syslog package under Solaris.
If use 'stream', i don't get anything logged:
#!/usr/local/bin/perl
use strict;
use Sys::Syslog qw(:DEFAULT setlogsock);
setlogsock('stream');
openlog("perl", "pid", "local2");
syslog("debug", "test stream");
closelog;
But if use udp it works fine:
#!/usr/local/bin/perl
use strict;
use Sys::Syslog qw(:DEFAULT setlogsock);
setlogsock('udp');
openlog("perl", "pid", "local2");
syslog("debug", "test udp");
closelog;
Feb 18 10:56:24 localhost perl[375]: test udp
How to get stream at work?
My system:
Solaris 9 (SunOS samba 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V210)
Perl 5.8.8:
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=solaris, osvers=2.9, archname=sun4-solaris-64
uname='sunos samba 5.9 generic_118558-11 sun4u sparc
sunw,sun-fire-v210 '
config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl/sun4u -Dprivlib=/usr/local/lib/perl
-Dsitearch=/usr/local/lib/perl/site/sun4u
-Dsitelib=/usr/local/lib/perl/site -Ui_iconv -Uinstallusrbinperl
-Dcc=gcc -Doptimize=-D_REENTRANT -O2 -pipe -Duseshrplib -Ud_dosuid
-Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Dlocincpth=/usr/local/include
-Dloclibpth=/usr/local/lib -Dcf_email=tiamat@komi.mts.ru -Dcf_by=Alex
Deiter'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -pipe
-Wdeclaration-after-statement -I/usr/local/include -mcpu=v9 -m64
-Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-D_REENTRANT -O2 -pipe',
cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/usr/local/include'
ccversion='', gccversion='4.0.2', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib -m64 '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldb -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true,
libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R
/usr/local/lib/perl/sun4u/CORE'
cccdlflags='-fPIC', lddlflags=' -G -m64 -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MYMALLOC PERL_MALLOC_WRAP USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
Built under solaris
Compiled at Feb 13 2006 18:55:06
%ENV:
PERL5LIB="/export/home/devel/tmp/lib/usr/local/lib"
@INC:
/export/home/devel/tmp/lib/usr/local/lib
/usr/local/lib/perl/sun4u
/usr/local/lib/perl
/usr/local/lib/perl/site/sun4u
/usr/local/lib/perl/site
/usr/local/lib/perl/site
Thanks a lot!