hmmm.. so does this mean that if I want to define my own pattern
layout, it is not possible?
-alex spitzer
On Mon, Sep 28, 2009 at 3:50 PM, Simon Gibbs wrote:
> Alexander Spitzer wrote:
>
> log4j does not appear to append the stack trace onto the event before
> passing it onto my appender. H
Alexander Spitzer wrote:
> log4j does not appear to append the stack trace onto the event before
> passing it onto my appender. Here is a quick test I just did:
>
> private void init_vars()
> {
> forcedLayout=new PatternLayout("%p %c %m");
> init=true;
> }
>
This too
log4j does not appear to append the stack trace onto the event before
passing it onto my appender. Here is a quick test I just did:
--CUT--- MyAppender.java - A CUSTOM APPENDER-
import java.net.*;
import java.util.*;
import java.io.*;
import org.apache.log4j.*;
import org.apache.l
Alexander Spitzer wrote:
> if they use
> logger.error("this is an error",myException)
>
.. then the exception is added to the event and passed to the appender
as 1 parameter.
perhaps the appender is going wrong when dealing with this data, try
debugging the appender. The logger code is right (a
I think I just did not explain it well (though there is a good chance
I am doing something wrong too.)
I followed an example on the web on how to create a custom appender.
It is essentially:
public class MyAppender extends AppenderSkeleton
private void init_vars(){
}
protected void append(Logging
> From: Alexander Spitzer [mailto:aspit...@gmail.com]
> Subject: How can I write a custom appender to supports Throwable as a second
> parameter?
>
> Is it possible to write a custom appender that can take an exception
> as a second parameter?
>
> I wrote a custom appender per the instructions on t
Jacob Kjome wrote:
> You're already inheriting the "stdout" and "base" appenders from the
> root logger. Don't re-define these on your child loggers unless
> additivity is turned off, which it is not. Additivity does not apply to
> appenders, it applies to loggers, e.g.,
>
> log4j.additivity
Brett Randall wrote:
> On Mon, Sep 28, 2009 at 9:23 AM, Pat Farrell wrote:
>> I think my configuration is a bit off. While the loggers for the
>> specific classes work fine, everything is also being logged to the root
>> logger, and I have "additivity" off.
> When you say it is going to the root
You're already inheriting the "stdout" and "base" appenders from the root
logger. Don't re-define these on your child loggers unless additivity is
turned off, which it is not. Additivity does not apply to appenders, it
applies to loggers, e.g.,
log4j.additivity.com.fnfbook=false
I would
Is it possible to write a custom appender that can take an exception
as a second parameter?
I wrote a custom appender per the instructions on the log4j site which
extends AppenderSkeleton.
Later, I found out that some of the developers use logger.xxx(String,
Throwable) instead of just the vanilla
Sorry ...
One thing which i noticed is when the xml files are used with each log4j.jar
file in each EAR file the back up index files are not getting created. But
in the properties file for the same usage of log4j.jar file in each EAR file
the back up is created.
The above observation is wrong.
Sorry heri..was in a leave for some time..
here are the answers for your question
1. Do you have two log4j.jar in the same application
No for each EAR file i have given only one log4j.jar file and by default
jboss comes with a log4j.jar file
2. You say that you use "the same log.properties"..
12 matches
Mail list logo