Thanks a lot, it makes perfect sense.
I think that i use MDC or NDC(the code works only on server side).
In my code I am able to name a thread an reuse it, so this gives additional
solution.
Bender Heri wrote:
OK, in the following I denote foo.bar.XY as AppA and com.create.CR as
AppB and
Thanks. I like your idea with the constructor but I call also the code that I
do not have an acces and I cannot modify, so I needed to look for something
different.
I have decided to use apache-log4j-extras-1.0.jar and use
filters(org.apache.log4j.filter.ExpressionFilter).
In each specific
Now things getting clearer.
Log4j maintains a logger hierarchy which is determined by the dot withing the
logger names, similar to the package hierarchy in java.Example:
Config: you declare a logger foo.bar and a root logger, both have one (the
same) appender attached.
Code: class
Thank you very much for the explanation. It makes perfect sense for me.
But in my case I hit slightly different problem.
The class foo.bar.XY calls lets say test.bulk.ZY and the class com.create.CR
calls test.bulk.ZY as well.
I need two full log files for foo.bar.XY and test.bulk.ZY with all
Questions see inline.
Heri
-Original Message-
From: Camer38 [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2008 3:24 PM
To: log4j-user@logging.apache.org
Subject: RE: additivity attribute does not work for
user-defined logger but works for root logger.
But in my case I hit
Yes, it is a typo.
Should be:
I need two full log files for foo.bar.XY and com.create.CR with all the
logs information from test.bulk.ZY
Yes the foo.bar.XY and com.create.CR are run in different threads.
I want two logs files - one for foo.bar.XY and the second one for
com.create.CR.
All of
OK, in the following I denote foo.bar.XY as AppA and com.create.CR as
AppB and the test.bulk.ZY as UtilityC.
Possible solutions:
1. If the UtilityC is instantiated separatly by AppA and AppB (two
instances) you are perfectly done by configuring each instance with the
desired logger:
Config:
Camer38 wrote:
I have two Java classes that used log4j.
curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter and
curam.tools.upgradehelper.taskredirection.TaskRedirectionConverter
Both classes from above uses different class:
curam.tools.upgradehelper.util.SQLStatements
Jacob Kjome skrev den 07-07-2008 08:11:
logging name each time it is used. You'll have do add a constructor that takes
a
logger name, such as...
public SQLStatements(String loggerName) {...}
And then each time you use this helper class, pass in the logger name to use.
For
instance...
Thanks.
So, is it any way to define a logger to works the same way as root logger
does?
Carol Enderlin wrote:
My answers below...
Why the root logger defined:
root
level value=debug/
appender-ref ref=taskRedirection/
appender-ref ref=addQuestionSequenceOrder/
Please provide your full log4j.xml.
Heri
-Original Message-
From: Camer38 [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 3:26 PM
To: log4j-user@logging.apache.org
Subject: additivity attribute does not work for
user-defined logger but works for root logger.
I have
It is correct log4j.xml
log4j:configuration debug=true
xmlns:log4j=http://jakarta.apache.org/log4j/;
appender name=addQuestionSequenceOrder
class=org.apache.log4j.RollingFileAppender
layout class=org.apache.log4j.PatternLayout
Camer38 skrev den 03-07-2008 15:25:
My assumption was that if I run one of the class
curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter I would got all
the logs from that class and all the classes used internally by
curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter in the
My answers below...
Why the root logger defined:
root
level value=debug/
appender-ref ref=taskRedirection/
appender-ref ref=addQuestionSequenceOrder/
/root
knows that all the logs from ALL the classes should go the the file
specified by appenders:taskRedirection,
14 matches
Mail list logo