logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jitendra Kharche" <Jitendra.Khar...@geometricsoftware.com>
Subject RE: Need properties files example for multiple output files
Date Tue, 09 Aug 2005 11:50:32 GMT
 

Hi Rick,

I have a similar requirement. But I am using xml version of log4j config
file. When I tried to convert this into an xml config file, I stucked at
one point. In xml file we define Appender and then provide appender-ref
in logger defination. Whereas in the configuration given by you, first a
logger is defined with Level and Name and the name is used to define an
appender. How this is written in xml config file?

Thanks in advance.
Jitendra

-----Original Message-----
From: Rick_Herrick@ahm.honda.com [mailto:Rick_Herrick@ahm.honda.com] 
Sent: Wednesday, August 03, 2005 10:55 PM
To: Log4J Users List
Subject: Re: Need properties files example for multiple output files

Something like this:

# Root logger
log4j.rootLogger=FATAL, console

# World Company logger definitions
log4j.logger.com.worldcompany.application=FATAL, main
log4j.logger.com.worldcompany.application.base=ERROR, base
log4j.logger.com.worldcompany.application.net=DEBUG, net

# Console output
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{ISO8601} [%5.5t] %-5p
%c{2} - %m%n log4j.appender.console=org.apache.log4j.ConsoleAppender

# Main logger
log4j.appender.main=org.apache.log4j.DailyRollingFileAppender
log4j.appender.main.file=${catalina.home}/logs/log_application.fatal
log4j.appender.main.layout=org.apache.log4j.PatternLayout
log4j.appender.main.layout.ConversionPattern=%d{ISO8601} [%5.5t] %-5p %c
- %m%n

# Base logger
log4j.appender.base=org.apache.log4j.DailyRollingFileAppender
log4j.appender.base.file=${catalina.home}/logs/log_application.base.err
log4j.appender.base.layout=org.apache.log4j.PatternLayout
log4j.appender.base.layout.ConversionPattern=%d{ISO8601} [%5.5t] %-5p %c
- %m%n

# Net logger
log4j.appender.net=org.apache.log4j.DailyRollingFileAppender
log4j.appender.net.file=${catalina.home}/logs/log_application.net.debug
log4j.appender.net.layout=org.apache.log4j.PatternLayout
log4j.appender.net.layout.ConversionPattern=%d{ISO8601} [%5.5t] %-5p %c
- %m%n



 

             Xavier Outhier

             <xavier.outhier@s

             iemens.com>
To 
                                       log4j-user@logging.apache.org

             08/03/2005 10:03
cc 
             AM

 
Subject 
                                       Need properties files example for

             Please respond to         multiple output files

               "Log4J Users

                   List"

             <log4j-user@loggi

              ng.apache.org>

 

 





Hi,

sorry to ask this newbie question.
Could someone sent me or redirect me to a sample of a properties file
that will create several output files trace with of course different
content.

For instance I want to trace

ERROR of com.worldcompany.application.base to log_application.base.err
DEBUG of com.worldcompany.application.net to log_application.net.debug
FATAL of com.worldcompany.application to log_application.fatal

thanx,

Xavier.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message