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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
16 matches
Mail list logo