Fernando, if I understand your question correctly, this line that you have:

        log4perl.rootLogger=ERROR, LOGFILE

tells log4perl to send all messages whose log level is "error" or
"fatal" to your LOGFILE appender.  If you want to send "info" messages
too, then do this, changing ERROR to INFO:

        log4perl.rootLogger=INFO, LOGFILE

That will send all messages of level "info", "warn", "error" and "fatal"
to your LOGFILE.

Does that answer your question?

Fernando Sousa wrote:
> Hi all,
> 
> probably you can give some help on this topic.
> I'm using the Log-Log4perl-1.14 and I've initialize the following
> log.conf file:
> 
> [root@ test]# cat log.conf
> ##############################
> ##############################
> # A simple root logger with a Log::Log4perl::Appender::File
> # file appender in Perl.
> ############################################################
> 
> log4perl.rootLogger=ERROR, LOGFILE
> 
> log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
> log4perl.appender.LOGFILE.filename=/tmp/myerrs.log
> log4perl.appender.LOGFILE.mode=append
> 
> log4perl.appender.LOGFILE.layout=PatternLayout
> log4perl.appender.LOGFILE.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n
> 
> 
> With this setup, log4perl will catch all Errros and stores it at
> /tmp/myerrs.log file.
> My intention is to capture ERRORs and also the INFOs traces.
> Something like "log4perl.rootLogger=ERROR and INFO, LOGFILE".
> 
> Is it possible to do ?? if yes, how it does??
> 
> 
> Best Regards,
> Fernando
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> log4perl-devel mailing list
> log4perl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/log4perl-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to