You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Alan Robertson <ar...@mail.infonow.com> on 2001/04/04 00:51:23 UTC

filtering on extra attributes

Hey all,

Sorry to bug you all with another question, but I'm heading towards a
deadline.  I'm looking into how I can filter log messages based on an
attribute of my own making.  This would be similar to filtering on the
'hostname' attribute of the AppServer example.  If anyone has an example
of the Filter object I need to create to do this, and how to use it
properly in my xml config file, I would greatly appreciate it.

Thanks,
Alan


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


Re: filtering on extra attributes

Posted by Alan Robertson <ar...@mail.infonow.com>.
Well, this was pleasantly simple, no need for anyone to reply to this now.
If you are having problems with this same thing, just try modifying
org.apache.log4j.varia.PriorityMatchFilter.  And instead of matching on
priority just match on an attribute in your own version of LoggingEvent.
Now on to extending priorities!

Alan Robertson wrote:

> Hey all,
>
> Sorry to bug you all with another question, but I'm heading towards a
> deadline.  I'm looking into how I can filter log messages based on an
> attribute of my own making.  This would be similar to filtering on the
> 'hostname' attribute of the AppServer example.  If anyone has an example
> of the Filter object I need to create to do this, and how to use it
> properly in my xml config file, I would greatly appreciate it.
>
> Thanks,
> Alan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org


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