From: Manuel de V. B. <mba...@re...> - 2002-11-01 11:43:13
|
I have problem configuring syslog appender (Log-Dispatch-2.01) to work=20 with Log4Perl(Log-Log4perl-0.25). I use these script and config file: script ------------------------------------------------ #! /usr/local/bin/perl use strict; use Log::Log4perl qw(get_logger :levels); Log::Log4perl::init('log4perl.conf'); my $logger =3D get_logger(""); $logger->level($INFO); print "Ahora con nivel ERROR\n"; $logger->info("principal INFO"); $logger->error("principal ERROR"); ------------------------------------------------- config file ------------------------------------------------- log4j.rootLogger =3D ERROR, B1, A1 log4j.appender.A1=3DLog::Dispatch::Screen log4j.appender.A1.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=3D%d [%t] %-5p %c - %m%n log4j.appender.B1 =3D Log::Dispatch::Syslog log4j.appender.B1.layout =3D Log::Log4perl::Layout::SimpleLayout log4j.appender.B1.name =3D file1 log4j.appender.B1.min_level =3D error log4j.appender.B1.ident =3D prueba log4j.appender.B1.level =3D error log4j.appender.B1.facility =3D local1 log4j.appender.B1.socket =3D inet ------------------------------------------------- I have tried a simple script using only=20 Syslog daemon and Log-Dispatch-2.01: ------------------------------------------------ #! /usr/local/bin/perl use Log::Dispatch::Syslog; my $file =3D Log::Dispatch::Syslog->new( name =3D> 'file1', min_level =3D> 'info', socket =3D> 'inet', facility =3D> 'local1', ident =3D> 'prueba' ); $file->log( level =3D> "error", message =3D> "un mensajito 3" ); -------------------------------------------------------- that work fine, so I think something is wrong in log4perl config file. Anyone can help me? Thanks -- ---------------------------------------------------------------------------= --- p.d. (Only for future Spanish Translators) Te animas con alguna de las ayudas de gnome-core, gnome-applets o gnome-utils? http://www.linuxlots.com/~barreiro/spanish/gnome-es/v1.4/gnome-es-ayudas-1.= 4.html Manuel de Vega Barreiro. mba...@re... En un lugar de la red Madrid. Espa=F1a. usuario linux: 17.419, 62.146 de cuyo nombre no quiero http://www.linuxlots.com/~barreiro Linux Landia acordarme.......... ---------------------------------------------------------------------------= --- |