log4J configuration at runtime

2003-12-11 Thread ravindra.gupta
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

Thinking about log4j performance

2003-12-11 Thread Yu Xiang Xi (Maveo)
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

RE: logging data in wrong file

2003-12-11 Thread Adrian Janssen
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

multiple log4j statements on the same console line

2003-12-11 Thread James Radvan
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

Re: Unexpected logger ancestor

2003-12-11 Thread Ceki Gülcü
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

log4j.debug

2003-12-11 Thread Tbee
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

RE: [Chainsaw]: Ant-based installer

2003-12-11 Thread Ceki Gülcü
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

RE: multiple log4j statements on the same console line

2003-12-11 Thread Adrian Janssen
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

Log based on object and not the class

2003-12-11 Thread Scott Melcher
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

Re: Log based on object and not the class

2003-12-11 Thread steve . beech
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

RE: Log based on object and not the class

2003-12-11 Thread Adrian Janssen
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

RE: Log based on object and not the class

2003-12-11 Thread Scott Melcher
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

RE: Log based on object and not the class - Solution

2003-12-11 Thread Scott Melcher
Ceki, That’s 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

RE: Log based on object and not the class

2003-12-11 Thread Andy McBride
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

Log output path problem

2003-12-11 Thread Yansheng Lin
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

RE: Log based on object and not the class

2003-12-11 Thread Jensen, Jeff
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.

RE: Log output path problem

2003-12-11 Thread Shapira, Yoav
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

Re: Unexpected logger ancestor

2003-12-11 Thread tom ONeill
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

RE: [Chainsaw]: Ant-based installer

2003-12-11 Thread Scott Deboy
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

RE: Log output path problem

2003-12-11 Thread Yansheng Lin
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

Re: Thinking about log4j performance

2003-12-11 Thread Paul Smith
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

RE: Log output path problem

2003-12-11 Thread Shapira, Yoav
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

RE: Log output path problem

2003-12-11 Thread Yansheng Lin
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

RE: Dynamic Configuration

2003-12-11 Thread Shimi Avizmil
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

RE: Dynamic Configuration

2003-12-11 Thread Paul Smith
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

RE: Dynamic Configuration

2003-12-11 Thread Shimi Avizmil
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

RE: Dynamic Configuration

2003-12-11 Thread Paul Smith
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

RE: Dynamic Configuration

2003-12-11 Thread Shimi Avizmil
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

RE: Dynamic Configuration

2003-12-11 Thread Paul Smith
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

RE: Dynamic Configuration

2003-12-11 Thread Shimi Avizmil
-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