Hi ,
I am loading the log4j.xml file using DOMConfiguratior.what i need is
1) path of log4j.xml
2) path of log file folder
should be resolve at run time using some XML file . Any suggesstions ??
DISCLAIMER:
This message contains privileged and confidential information and is intended
It's known that log4j has a good performance even 'on an AMD Duron clocked
at 800Mhz running JDK 1.3.1' machine.
If I have lot of appenders, for example, a socket appender, which will cost
0.1 second to communicate with the socket server, and there's still a file
appender in the system all the
well, what was it?
-Original Message-
From: Vince Law [mailto:[EMAIL PROTECTED]
Sent: 10 December 2003 22:02
To: 'Log4J Users List'
Subject: RE: logging data in wrong file
I found out what caused the problem. Thanks!
Vince
-Original Message-
From: Vince Law [mailto:[EMAIL
Hi, I'm having trouble with log4j 1.2.8 with a ConsoleAppender. I'm getting
all my sequential log4j outputs to the same line of the console, rather than
1 per line.
Here is my log4j.properties:
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
At 06:06 PM 12/10/2003 +, tom ONeill wrote:
No, absolutely not.
X.Z and Y.Z should bear no relation to each other except their common
ancestor the 'root' logger.
Does that answer your question?
Thanks for your help Ceki
So you are saying that my Y.Z logger should not be created as
Okay, here is something interesting. I mentioned my problems with log4j.debug
before, but had to reinstall my laptop (Oracle and Informix were getting in
each others hair) and before I was back at this point... Anyway.
Sometimes when I set the log4j.debug log4j is not debugging, but I do get
How about allowing both? Ignoring just the selected node in the tree
(as is the case currently) **or** ignoring the selected node and its
children.
The solution of expressions suggested by Scott offers a far more
precise control but probably is harder to put in place for the user.
Just my 2
add a %n to your pattern.
From javadocs:
Outputs the platform dependent line separator character or characters.
This conversion character offers practically the same performance as using
non-portable line separator strings such as \n, or \r\n. Thus, it is the
preferred way of specifying a line
Hi, my problem is that in my object architecture/hierarchy I have dozens of
classes that extend a single parent class. The parent class has a method
that is called by all of the child classes. It is in this method that I
have several log statements. The problem is that I only have the ability
Scott,
Why not add a switch parameter to the parent method?
i.e
Class Parent {
...
Public void myMethod(boolean b) {
if (b==true) {
Logger.debug(logging message);
}
}
}
Class
Pass the child object's Logger in to the parent method.
-Original Message-
From: Scott Melcher [mailto:[EMAIL PROTECTED]
Sent: 11 December 2003 15:47
To: 'Log4J Users List'
Subject: Log based on object and not the class
Hi, my problem is that in my object architecture/hierarchy I have
I considered doing something like you suggested but I just hate to add code
in order to handle logging. Our application is very large and I would have
to add some object layers in order to get it to work. It seems like
overkill. For now I may just put external filters on my application that
Ceki,
Thats an excellent solution. It's not very intrusive to the application.
I pay the expense of an extra method call but the benefits probably outweigh
the cost.
Thank you very much.
-Original Message-
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003
I use something like this:
public class Parent
{
protected Logger log = Logger.getLogger(getClass());
public void myMethod()
{
log.debug(logging message);
}
}
public class Child1 extends Parent
{
public void execute1()
{
myMethod();
}
}
public class Child2 extends
Hi, I want my log output to go to /WEB-INF/logs/ as specified in my
log4j.properties
log4j.rootLogger=debug, stdout, ROOT_APPENDER
log4j.appender.ROOT_APPENDER=org.apache.log4j.DailyRollingFileAppender
I have a couple of thoughts for you, but both violate at least one restriction you
placed on the solution! The ideas may lead you to something better than you currently
have though.
1) Use Template Method pattern.
You mentioned not wanting to change code, and this solution does require that.
Howdy,
You need to specify the absolute path or use an environment variable,
such as one set to the server's home. Your current specification is
relative to the current working directory of the server, which varies
depending on how the server is invoked.
Yoav Shapira
Millennium ChemInformatics
Hi Ceki,
Thanks for your responses. Your cynical thought was correct. I had it fact
configured my wrapper incorrectly. However I have learned a good bit more
from tracing through log4j's source code today so I suppose its not all bad
:)
Tom
From: Ceki Gülcü [EMAIL PROTECTED]
Reply-To: Log4J
A couple of comments about the 'focus on' expression-based capabilities:
I'll add a 'remove from focus' to the right mouse button that will add the ! (whatever
is under mouse) to the 'focus on' text field
Please note that when you're in the 'focus on' text field, you can press the right
mouse
This is weird. I had it working two hours ago with /web/WEB-INF/logs/debug.log
as my output path. Now it's not working!!! I have to use the absolute path to
make logging working for now. Also it seems that if I use the relative path
/web/debug.log or just debug.log, things worke fine, but that's
In almost all cases this is correct, the logging done to the appender is
all done within the same thread.
Only the AsyncAppender performs it's appending in a separate thread.
regards,
Paul Smith
On Thu, 2003-12-11 at 19:32, Yu Xiang Xi (Maveo) wrote:
It's known that log4j has a good
Howdy,
You're asking a number of questions in this one post.
This is weird. I had it working two hours ago with /web/WEB-
INF/logs/debug.log
as my output path. Now it's not working!!! I have to use the absolute
path
The above is an absolute path. It should work (provided you have
permission
Thanks, I think I know where my problem is. Must be a bad day for me. I just
realized I have been assuming that the './' and '/' being the same thing.
And you can imagine my surprise when I saw where things went when I invoke the
server within eclipse. I always thought the path is relative to
Anyone? I'm really lost here ...
TIA
-Original Message-
From: Shimi Avizmil
Sent: Thursday, 11 December 2003 3:29 PM
To: '[EMAIL PROTECTED]'
Subject: Dynamic Configuration
Hi all,
I spent few hours going through the past messages, but I couldn't
Problem 1: I think we'll need to see the code where you initialise the
logger, and where you do the actual logging. Storing a local reference
to the logger is fine, and the recommended practice. If you make it
static, even better, I am not sure why you would want the GC to collect
it.
Problem
First of all thanks for the reply !
Problem 1:
private Log log = MySystem.getLog(getClass().getName());
I'm not talking about gc the logger, I'm talking about a case where if I have an
object that has a static logger reference, and this object is not used anymore, will
this object get gced? I
On Fri, 2003-12-12 at 10:59, Shimi Avizmil wrote:
First of all thanks for the reply !
Problem 1:
private Log log = MySystem.getLog(getClass().getName());
I'm not talking about gc the logger, I'm talking about a case where if I have an
object that has a static logger reference, and this
Problem 1:
thanks for that Paul, makes sense.
I'll give it a go and see if it fixes the problem.
Problem 2:
You mentioned that you get those messages as well sometimes, do you know why?
-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 December 2003 11:11 AM
Problem 2:
You mentioned that you get those messages as well sometimes, do you know why?
It is possible that there might be some synchronization problem at the
point of the call to a specific appender's close() method, and during
the close, some logs try and come through to be appended.
What
-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 December 2003 11:27 AM
To: Log4J Users List
Subject: RE: Dynamic Configuration
Problem 2:
You mentioned that you get those messages as well sometimes, do you know why?
It is possible that there might be
30 matches
Mail list logo