Globally MDC.put/remove for hole web application

2004-04-22 Thread Stefan Preuss
Hi, is it possible to set/remove properties on MDC globally for the hole web application (for every client request) instead of doing it in every JSP and Servlet? Thanks. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For a

XML Namespaces

2004-04-22 Thread Sikha, Naresh
I have been using Log4j's XML layout but I would like to make the insertion of the XML namespace optional. This will allow me to reduce the log file size and render it in a browser window. I would like to be able to choose between: http://jakarta.apache.org/log4j/"/> and http://jakarta.apac

Re: JNDI datasource:

2004-04-22 Thread Ceki Gülcü
Hi Matt, Your request is a very reasonable requirement that we should really support. At 12:45 AM 4/22/2004, Matthew Arveson wrote: I have been using log4j to write logging statements to text files, but I would like to switch to a DB. I have the DB set up, and the following works great: log4j

Re: Possible/practical to make "debug" use one set of appenders, but "error" use a different set?

2004-04-22 Thread Robert Pepersack
Hi David. It's in Ceki's book, Chapter 3. You can set the threshold of an appender different from the threshold of its logger. Since you can have more than one appender for a logger, it follows that one logger can have appenders that are set to different thresholds. At 11:21 AM 04/22/2004

Re: Possible/practical to make "debug" use one set of appenders, but "error" use a different set?

2004-04-22 Thread Jim Moore
It's in the FAQ. http://wiki.apache.org/logging-log4j/Log4JProjectPages_2fLogByLevel - Original Message - From: "Karr, David" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 2:21 PM Subject: Possible/practical to make "debug" use one set of appenders, but "err

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread James Stauffer
Possible off topic so feel free to tell me to stop... It has a cost in your time and added complexity. If someone new enters your project it will take them longer to figure our what is going on. Granted, that cost doesn't seem very great but why not use your time where you know it will actually p

Re: html appender help

2004-04-22 Thread James
you are using DailyRollingFileAppender with HTMLLayout. You can write your own layout just like HTMLLayout. I have my own with few column and use DateFormat.format() to get the date time. --- adam <[EMAIL PROTECTED]> wrote: > Hello. > > > > > > I am trying to configure an HTML appender. How

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Robert Pepersack
I've never tried calling isDebugEnabled() again and again in the same class. I'm new to log4j, so I don't have a lot of code that uses log4j. It doesn't cost me anything to factor out the tests from the beginning. Every little bit of performance tuning (no matter how insignificant) helps whe

Possible/practical to make "debug" use one set of appenders, but "error" use a different set?

2004-04-22 Thread Karr, David
Is it possible or practical to configure a Logger so that it will use one set of appenders for the "debug" level, and one set of appenders for the "error" level (or any other combination of levels)? I didn't think so, but someone told me this was possible, perhaps by doing something like including

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread James Stauffer
If you don't know that it has any noticeable affect on your performance than is that just wasted time? James Stauffer -Original Message- From: Robert Pepersack [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 12:21 PM To: Log4J Users List Subject: RE: Which Way of "Extending" G

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Robert Pepersack
It shouldn't be significant. On page 41 of the book, Ceki says, "This is an insignificant overhead because evaluating a logger takes less than 1% of the time it actually takes to log. If a method contains multiple log statements, it may be possible to factor out the tests." I factor out the t

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread James Stauffer
Is the call to isDebugEnabled actually significant? James Stauffer -Original Message- From: Robert Pepersack [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 11:49 AM To: Log4J Users List Subject: Re: Which Way of "Extending" Gives Fastest Performance You could create a class

Re: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Robert Pepersack
You could create a class boolean variable that is set once by isDebugEnabled(). Then you could say: private boolean debug = logger.isDebugEnabled(); In you method code you could say: if (debug) cat.debug(myObject.showState()); This would make it so that you only call isDebugEnabled() once in

Re: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Denis Haskin
This is a little off from the original question, and note that we also haven't touched any of our logging code in quite a while, but: We found that we had to address some performance problems where there was an insignificant cost to creating the string that we were going to send to log4j. For

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Keith Hatton
>> I believe Ceki's assertion that wrapping is the best and safest thing to do from a software engineering standpoint. But, my users and my boss care more about how fast the application performs. << Do no logging at all. That will be fastest. Of course, it may not be right, but you've just sai

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread James Stauffer
Do you know that logging has a significant effect on your current performance? If it only takes 0.01% of CPU time then it doesn't really matter. James Stauffer -Original Message- From: Robert Pepersack [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 10:31 AM To: [EMAIL PROTEC

Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Robert Pepersack
Hi all. I'm considering wrapping or extending log4j. I've read this subject in Ceki's book and this user list, but I can't find a performance comparison. I believe Ceki's assertion that wrapping is the best and safest thing to do from a software engineering standpoint. But, my users and my

html appender help

2004-04-22 Thread adam
Hello. I am trying to configure an HTML appender. However I cannot find any examples or documentation on using html appenders. I have included the configuration that I am using now: Basically the format of the log file is: Time | Th