Yes, appenders can be attached at multiple places in the hierarchy. An
appender can also be attached multiple times to the same logger or on two
different levels of the hierarchy (for example if you attached A1 to the
rootLogger), both of which can result in an appender processing the same even
Either:
you patch the apache class yourself or submit a bug to its developers (or
both)
Or:
you implement a workaround:
- exclude the path of your own class (like it is seen by the apache
getClass():
- instantiate your own logger with an arti
log4j.rootLogger = ERROR, stdout
log4j.logger.org.jboss = DEBUG, A1
log4j.logger.ca.xyz = INFO, A1
A1 is a DaylyRollingFileAppender. Just wondering of both logers can use the
same A1 appender.
-
To unsubscribe, e-mail: log4j-use
Turns out u were right, the parent class(AbstractHttpClient) instantiates the
log like this:
private final Log log = LogFactory.getLog(getClass());
Also turns out that this is a commons.logging logger and not a log4j as i
thought
Also it looks like it's private so i can't override it, any ideas?
Probably the parent class does not instantiate his logger statically but like
this:
Logger logger = Logger.getLogger( this.getClass().getName() );
and therefore it retrieves a logger with the name of your descendant (name
starting with your namespace). If it would instantiate it statically:
st
Hi,
I have a java class inheriting from an apache class file. The apache class
file is packaged in org.apache... and such i do not see the logs for it,
which is great. However, my own class is within my namespace (which i'm
logging) and as such it now writes the logs of the parent class.. my
ques