Hi,
   I am facing another problem with Log4j. I am geting duplicate entriesin
my log appender (in this case the console).
Basically I defined two appenders for two categories in order to get two
different formats of log. But I find that the log for the 
root category comes along with the one for a child category. I believe it
has something to do with the additive variable in the 
Category class. How do we tackle this situation from the property file that
I have described below.

The property file is as below.

# Set root category priority to DEBUG and its only appender to A1.
log4j.rootCategory=DEBUG, A1
log4j.category.com.myname.cog.y.z=DEBUG, VOA

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.VOA=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r %-5p %c %x - %m%n

#VOA uses PatternLayout
log4j.appender.VOA.layout=org.apache.log4j.PatternLayout
log4j.appender.VOA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

#log4j.category.java.util=WARN


Parthasarathi Das

Cognizant
GPTronics Building
Phone 3573211 ext 1510


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to