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 Kamal Ahmed <KA...@webMethods.com> on 2007/01/03 19:51:50 UTC

RE: Using same log4j.properties for logging in two different log file

Pankaj,

 

Here is an example of two files

 

log4j.rootLogger=DEBUG, rolling

log4j.logger.QA_Logger=DEBUG, flogger,consoleapp

log4j.additivity.QA_Logger=false

 

log4j.appender.rolling=org.apache.log4j.RollingFileAppender

log4j.appender.rolling.File=log/root1.log

log4j.appender.rolling.layout=org.apache.log4j.PatternLayout

log4j.appender.rolling.layout.ConversionPattern=%d{HH:mm:ss} %5p %t %c -
%m%n

 

log4j.appender.consoleapp=org.apache.log4j.ConsoleAppender

log4j.appender.consoleapp.layout=org.apache.log4j.PatternLayout

log4j.appender.consoleapp.layout.ConversionPattern=%d{HH:mm:ss} %5p %t %c -
%m%n

 

log4j.appender.flogger=org.apache.log4j.FileAppender

log4j.appender.flogger.File=log/root2.log

log4j.appender.flogger.layout=org.apache.log4j.PatternLayout

log4j.appender.flogger.layout.ConversionPattern=%d{MM/dd/yy HH:mm:ss.SSS}
%5p %t %c - %m%n

 

hope this helps

 

-Kamal.

 

-----Original Message-----
From: Pankaj Chomal [mailto:Pankaj.Chomal@amdocs.com] 
Sent: Friday, December 29, 2006 4:41 AM
To: Log4J Users List
Subject: Using same log4j.properties for logging in two different log file

 

 

 

Hi All,

 

I want to use an existing (existing in my application) log4j.properties

file for logging the logging information in two different log file, is

it possible?

 

If Yes, then how it will be differentiating that which information needs

to be logged to which log file?

 

Thanks,

Pankaj Chomal

 

 

This message and the information contained herein is proprietary and
confidential and subject to the Amdocs policy statement,

you may review at http://www.amdocs.com/email_disclaimer.asp

 

---------------------------------------------------------------------

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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