Path exclusion for logs

2010-03-18 Thread Angeli106

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
question is, can i exclude certain paths from the log? (such as the path for
the class that i've inherited)

-- 
View this message in context: 
http://old.nabble.com/Path-exclusion-for-logs-tp27945800p27945800.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: AW: Path exclusion for logs

2010-03-18 Thread Angeli106

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?




Bender Heri wrote:
> 
> 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:
> 
> static Logger logger = Logger.getLogger( org.apache. ..ApacheParent.class
> );
> 
> then the name of the logger would start with "org.apache. .." and would be
> excluded if you have a corresponding configuration.
> 
> Just a guess. If this is not the case, you should submit your config file
> for further analyzis.
> 
> Heri
> 
> 
> -Ursprüngliche Nachricht-
> Von: Angeli106 [mailto:angeli...@gmail.com] 
> Gesendet: Donnerstag, 18. März 2010 14:50
> An: log4j-user@logging.apache.org
> Betreff: Path exclusion for logs
> 
> 
> 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
> question is, can i exclude certain paths from the log? (such as the path
> for the class that i've inherited)
> 
> --
> View this message in context:
> http://old.nabble.com/Path-exclusion-for-logs-tp27945800p27945800.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Path-exclusion-for-logs-tp27945800p27946728.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org