RE: org.apache.commons.logging.LogConfigurationException

2004-09-15 Thread raghu.changlaveedu
Jacob, Thanks,for the Info. I have got the problem solved. The issue was because of an error in the classloading hierarchy. I had my commons logging jar loaded by the application class loader where as the Log4j jar was loaded by my webapp classloader. So the commons jar didnt have the v

MDC in J2EE

2004-09-15 Thread Lutz Michael
According to the J2EE spec there is no guarantee that a .forward request or an EJB call will execute on the same thread (even if the EJB call lands in the same process). This seems to render MDC and NDC much less useful because these constructs rely on the thread. Changing it pulls the rug out

RE: MDC in J2EE

2004-09-15 Thread Shapira, Yoav
Hi, If you're talking about the RequestDispatcher#forward method, the Servlet Spec guarantees that it will execute on the same thread as the original request (Servlet Spec v2.4, section SRV.8.2, it's unambiguous), so that's what you're missing there. For EJB calls, I don't know, you might be righ

this has to be super simple: different logger, multiple appenders, for different classes

2004-09-15 Thread Marc Esher (4-2060)
All, This has to be so simple: I have 2 classes, and I want each of those classes to use a different logger. Each logger will have an stdout, email, and file appender When I call the logger for Class1, I want to say getLogger("Class1") and then have the 3 different appenders for that logger

RE: this has to be super simple: different logger, multiple appenders, for different classes

2004-09-15 Thread DE BENEDICTIS DAVIDE
You can find it directly in the standard docs shipped with log4j Bye > -Original Message- > From: Marc Esher (4-2060) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 15, 2004 3:39 PM > To: [EMAIL PROTECTED] > Subject: this has to be super simple: different logger, > multiple ap

RE: MDC in J2EE

2004-09-15 Thread Lutz Michael
Thanks Yoav. Mike -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 9:27 AM To: Log4J Users List Subject: RE: MDC in J2EE Hi, If you're talking about the RequestDispatcher#forward method, the Servlet Spec guarantees that it will execut

RE: this has to be super simple: different logger, multiple appenders, for different classes

2004-09-15 Thread Marc Esher (4-2060)
Oh, and I should say that I'm using a standard log4j properties file. So given what I have below, how do I change it? Thanks! log4j.debug=true #First appender dumps to screen log4j.rootCategory=DEBUG, stdout, F, email log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.la

RE: this has to be super simple: different logger, multiple appenders, for different classes

2004-09-15 Thread Shapira, Yoav
Hi, In your configuration file, define all six appenders. Call them stdout1, stdout2, email1, email2, file1, file2. The syntax for this is in the JavaDoc for the PropertyConfigurator class, as well as the Short and Complete log4j manuals. Set additivity to false for all six appenders. Maybe fo

logging a stack trace

2004-09-15 Thread Jeff Drew
How do I write a stack trace to a log? I found some references in the mail archives, but couldn't find a solution. I couldn't find it in Ceki's book. Here's a simple example of my goal. Thanks! public class LogStackTrace { static Logger logger = Logger.getLogger("LogStackTrace"); public s

RE: logging a stack trace

2004-09-15 Thread Shapira, Yoav
Hi, Logger.error("Exception: ", e); Yoav Shapira Millennium Research Informatics >-Original Message- >From: Jeff Drew [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 15, 2004 9:57 AM >To: Log4J Users List >Subject: logging a stack trace > >How do I write a stack trace to a log? >I

RE: this has to be super simple: different logger, multiple appenders, for different classes

2004-09-15 Thread Marc Esher (4-2060)
Perfect. Thanks Yoav! -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 9:44 AM To: Log4J Users List Subject: RE: this has to be super simple: different logger, multiple appenders, for different classes Hi, In your configuration file,

RE: logging a stack trace

2004-09-15 Thread Lutz Michael
the logging methods are overloaded, you can pass exceptions into the overloaded versions as a second parameter after the message (which is type Object) The type for the second parameter is Throwable -Original Message- From: Jeff Drew [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 1

Re: logging a stack trace

2004-09-15 Thread Jeff Drew
Thanks! This is a huge help! - Original Message - From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Log4J Users List" <[EMAIL PROTECTED]> Sent: Wednesday, September 15, 2004 9:56 AM Subject: RE: logging a stack trace Hi, Logger.error("Exception: ", e); Yoav Shapira Millennium Research In

looking for guidance - logging in JSPs

2004-09-15 Thread Lutz Michael
My organization has made a stance to minimize the Java code in our JSPs, specifically we only use custom tags and we only use them if necessary. Q: Given this position (which is hopefully realistic), in your opinion (and experience) would you consider there a need to add logging and tracing call

Chainsaw ClassNotFoundException issue

2004-09-15 Thread Vance Cochrane
Hello, Situation is this: installed jsdk 1.4.2_05 on Win2k Run java web start, get the latest version of chainsaw. I have SocketAppenders that have always worked in the past yet now I get the following exception displayed in Chainsaw whenever a SocketAppender attempts to connect: java.lang.ClassNo

RE: Chainsaw ClassNotFoundException issue

2004-09-15 Thread Scott Deboy
This was just discussed and worked through in a bugzilla issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=31178 The %L in patternlayout seems to be causing the problem for most people. If you are using %L in a filelayout, here are your options: - move the socketappender in front of the