Hi Paul,
Based on the manual and what you said, this is what I did:
I am logging events in 2 classes, viz.
com.sap.A - with corresp. logger com.sap.A
com.sap.B - with corresp. logger com.sap.B
In the props file, I write:
log4j.additivity.com.sap.A=false
log4j.additivity.com.sap.B=false
as in
On Fri, 2003-08-29 at 09:02, Rishikesh Tembe wrote:
Hi Paul,
Based on the manual and what you said, this is what I did:
I am logging events in 2 classes, viz.
com.sap.A - with corresp. logger com.sap.A
com.sap.B - with corresp. logger com.sap.B
In the props file, I write:
-log4j.properties-
log4j.rootLogger=INFO, d1
log4j.additivity.com.sap.EventThread=false
log4j.appender.d1=org.apache.log4j.FileAppender
log4j.appender.d1.File=threads.log
log4j.appender.d1.layout=org.apache.log4j.PatternLayout
On Fri, 2003-08-29 at 09:23, Rishikesh Tembe wrote:
-log4j.properties-
log4j.rootLogger=INFO, d1
log4j.additivity.com.sap.EventThread=false
log4j.appender.d1=org.apache.log4j.FileAppender
log4j.appender.d1.File=threads.log
It did work a treat! thanks...
That gave me better insight into log4j. Basically, we can
- configure it programatically through the API
- OR use the props file
Right?
And I was doing both, which was the source of the problem :)
-Rishi
=
It did work a treat! thanks...
That gave me better insight into log4j. Basically, we can
- configure it programatically through the API
- OR use the props file
Right?
Yes, although the property/xml files are the way to go. Just Log stuff
in your Java code, and don't worry about where it's
Howdy,
How are you configuring log4j?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Rishikesh Tembe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 2:43 PM
To: Log4J Users List
Subject: duplicate logging?
Hi all,
If in my code I have
logger.info(AIN:
The code is in a servlet running in Tomcat. I have
WEB-INF/classes/log4j.properties (shown below)
WEB-INF/lib/log4j-1.2.8.jar
which AFAIK should allow automatic configuration, shouldn't it?.
-Rishi.
--- Shapira, Yoav [EMAIL PROTECTED] wrote:
Howdy,
How are you configuring log4j?
Yoav
Is this how its done?
log4j.rootLogger.additivity=false
I tried this, but I still get the same result!
-Rishi.
--- Shapira, Yoav [EMAIL PROTECTED] wrote:
Howdy,
It should. Set additivity=false for the root logger and see what
happens.
Yoav Shapira
Millennium ChemInformatics
=
On Thu, 2003-08-28 at 06:32, Rishikesh Tembe wrote:
Is this how its done?
log4j.rootLogger.additivity=false
Close, but no cigar.
The Log Event starts getting logged at it's own Logger (say, the
com.mycompony.mycomponent Logger, and gets logged up the hierarchy
until it reaches the root
10 matches
Mail list logo