From: Kevin G. <ke...@go...> - 2002-11-01 17:27:09
|
Hey, Mike, when we call Log::Dispatch, we're sending it a message of=20 level 0 (DEBUG), wouldn't it make more sense to send it a 9 or=20 something, which means that log4perl messages would ALWAYS get through=20 instead of SOMETIMES depending on how the underlying appender system is=20 set up? Check out Logger.pm line 205-210 Manuel de Vega Barreiro wrote: > I have problem configuring syslog appender (Log-Dispatch-2.01) to work=20 > with Log4Perl(Log-Log4perl-0.25). >=20 > I use these script and config file: > script > ------------------------------------------------ > #! /usr/local/bin/perl > use strict; >=20 > use Log::Log4perl qw(get_logger :levels); > Log::Log4perl::init('log4perl.conf'); >=20 >=20 > my $logger =3D get_logger(""); >=20 >=20 > $logger->level($INFO); > print "Ahora con nivel ERROR\n"; > $logger->info("principal INFO"); > $logger->error("principal ERROR"); > ------------------------------------------------- >=20 > config file > ------------------------------------------------- > log4j.rootLogger =3D ERROR, B1, A1 >=20 > 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 >=20 > 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 > ------------------------------------------------- >=20 > I have tried a simple script using only=20 > Syslog daemon and Log-Dispatch-2.01: > ------------------------------------------------ > #! /usr/local/bin/perl >=20 > use Log::Dispatch::Syslog; >=20 > my $file =3D Log::Dispatch::Syslog->new( name =3D> 'file1', > min_level =3D> 'info', > socket =3D> 'inet', > facility =3D> 'local1', > ident =3D> 'prueba' ); >=20 > $file->log( level =3D> "error", message =3D> "un mensajito 3" ); > -------------------------------------------------------- > that work fine, so I think something is wrong in log4perl config > file. >=20 > Anyone can help me? >=20 > Thanks >=20 > -- > -----------------------------------------------------------------------= ------- > 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-ayuda= s-1.4.html >=20 > Manuel de Vega Barreiro. mba...@re... En un lugar de la > red > Madrid. Espa=F1a. usuario linux: 17.419, 62.146 de cuyo nombre n= o > quiero > http://www.linuxlots.com/~barreiro Linux Landia acordarme.......... > -----------------------------------------------------------------------= ------- >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm=20 > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel --=20 Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 |