logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Deboy <scott.de...@gmail.com>
Subject Re: I need to handle log4j:WARN Unrecognized element param
Date Sat, 16 Jul 2011 04:11:32 GMT
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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message