You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Xavier Outhier <xa...@siemens.com> on 2005/08/03 19:03:15 UTC

Need properties files example for multiple output files

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


Re: Need properties files example for multiple output files

Posted by Xavier Outhier <xa...@siemens.com>.
That's it thanx a lot. :)

X.

Rick_Herrick@ahm.honda.com wrote:

> 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


Re: Need properties files example for multiple output files

Posted by Ri...@ahm.honda.com.
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