logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, Jay" <Jay.Tur...@sabre-holdings.com>
Subject RE: I need to handle log4j:WARN Unrecognized element param
Date Mon, 18 Jul 2011 14:18:48 GMT
I had to add super(this) in a required constructor, but that seems to work, thank you.

Thank you,
Jay Turner

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Friday, July 15, 2011 11:12 PM
To: Log4J Users List
Subject: Re: I need to handle log4j:WARN Unrecognized element param

Good point :)

Try this:

public class MyLoggerRepository extends Hierarchy implements
UnrecognizedElementHandler{
...
add your unrecognized element handler here, should be all you need
}

public class MyRepositorySelector implements RepositorySelector {
private final LoggerRepository repository = new MyLoggerRepository();
public LoggerRepository getLoggerRepository(){
return repository;
}

Hopefully that's it?

Scott


On Fri, Jul 15, 2011 at 7:51 PM, Turner, Jay
<Jay.Turner@sabre-holdings.com>wrote:

> I had already looked at LoggerRepositoryExImpl. The documentation says it
> is part of org.apache.log4j but IntelliJ doesn't see it. I tried
> org.apache.log4j.spi but it wasn't there either. I grep'd log4j-1.2.15.jar
> and it has four "LoggerRepository"s but not even any "LoggerRepositoryEx"s.
> Besides, it's a final class. I found the 698 lines of the
> LoggerRepositoryExImpl java source from Apache, but copying it just to parse
> some extra elements seems - like using a chainsaw to trim my nails.
>
> Thank you,
> Jay Turner
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, July 15, 2011 8:26 PM
> To: Log4J Users List
> Subject: Re: I need to handle log4j:WARN Unrecognized element param
>
> Look at LoggerRepositoryExImpl..you may be able to use it.
>
> Scott
>
> On Jul 15, 2011, at 6:20 PM, "Turner, Jay" <Jay.Turner@sabre-holdings.com
>  > wrote:
>
> > LoggerRepositoryExImpl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

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


Mime
View raw message