Please correct your log4j.properties.  It's got two definitions for "rootLogger".  And one has the appender before the logging level which is wrong.

In any case, it looks like in both cases you are attempting a add, at least, the R appender to the root logger.  If you do that, then all child loggers will inherit it and log to it.  If you expect certain child loggers not to log to it, then either can't set it at the root logger or you need to set additivity to false for the loggers you don't want to go to the R appender.

Jake

On Fri, 17 Jul 2009 17:48:18 +0530 (IST)
 Seetha Rama Krishna <[email protected]> wrote:

Hi,
I am having two war (a.war, b.war)files each one is having its one log4j.properties. so two log files(a.log and b.log) are getting generated

Previously, these log4j.properties are there in each of the war files. so there is no problem is generating the log files.

I have removed these two log4j.properties from made it one log4j.proeprties and log information has to go to with respect the package com.org.do.presentation.don and its subsequent packages com.org.do.presentation.don.application,
        com.org.do.presentation.don.application.car like has to go a.log

com.org.do.presentation.admin.struts and its subsequent packages pacakages to go b.log


  Now the problem, log information is not populated as expected.


here is log 4j.properties

log4j.properties



log4j.rootLogger=DEBUG, stdout, WEB, R, ALERTS,
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n


log4j.logger.com.org.do.presentation.don =debug,WEB
log4j.appender.WEB=org.apache.log4j.DailyRollingFileAppender
log4j.appender.WEB.File=C:/logs/a.log
log4j.appender.WEB.DatePattern='.'yyyy-MM-dd-a
log4j.appender.WEB.layout=org.apache.log4j.PatternLayout
log4j.appender.WEB.layout.ConversionPattern=%d %p [%t] %c.%M() - %m%n
#log4j.additivity.WEB=false

log4j.rootLogger=R,debug

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=C:/logs/b.log
log4j.appender.R.DatePattern='.'yyyy-MM-dd-a
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %p [%t] %c.%M() - %m%n
#log4j.additivity.R=false



-------------------------------------
# Individual Class/Package Log Settings
# -------------------------------------

log4j.logger._jsps=DEBUG

log4j.logger.com.org=DEBUG
log4j.logger.com.org.doe=DEBUG

log4j.logger.org.apache=ERROR


     Can any let me know where i am doing mistake



Thanks & Regards,
Ram


See the Web&#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to