You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/10/21 12:32:38 UTC

DO NOT REPLY [Bug 46049] New: Filter support in PropertyConfigurator

https://issues.apache.org/bugzilla/show_bug.cgi?id=46049

           Summary: Filter support in PropertyConfigurator
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Configurator
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: lajospajtek@yahoo.com


Created an attachment (id=22761)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22761)
Patch for adding Filter support to PropertyConfigurator

The attached patch adds Filter Support for PropertyConfigurator. The syntax is
exemplified in this .properties file snippet:

my.StringToMatch=SOMEPATTERN
my.LevelToMatch=INFO
log4j.appender.CONSOLE.filter.01=org.apache.log4j.varia.StringMatchFilter
log4j.appender.CONSOLE.filter.01.StringToMatch=${my.StringToMatch}
log4j.appender.CONSOLE.filter.02=org.apache.log4j.varia.LevelMatchFilter
log4j.appender.CONSOLE.filter.02.LevelToMatch=${my.LevelToMatch}
log4j.appender.CONSOLE.filter.03=org.apache.log4j.varia.DenyAllFilter

For more info please refer to the modified JavaDoc in the patch.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 46049] Filter support in PropertyConfigurator

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46049





--- Comment #1 from Curt Arnold <ca...@apache.org>  2009-01-12 12:45:25 PST ---
There has been some discussion in implementing logback TurboFilter's (basically
filter evaluation prior to LoggingEvent construction) which would suggest being
able to add filters to the hierarchy (like the hierarchy threshold).  If that
moves forward, I think it would suggest a different approach for
PropertyConfiguration of filters.  What I was thinking (but haven't
implemented) was to construct filters along the same manner as appenders, so
the configuration would look like:

my.StringToMatch=SOMEPATTERN
my.LevelToMatch=INFO
log4j.filter.string=org.apache.log4j.varia.StringMatchFilter
log4j.filter.string.StringToMatch=${my.StringToMatch}
log4j.filter.level=org.apache.log4j.varia.LevelMatchFilter
log4j.filter.level.LevelToMatch=${my.LevelToMatch}
log4j.filter.deny=org.apache.log4j.varia.DenyAllFilter
log4j.appender.CONSOLE.filters=string,level,deny


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 46049] Filter support in PropertyConfigurator

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46049

Scott Deboy <sd...@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Scott Deboy <sd...@iname.com> 2009-10-03 14:54:59 PDT ---
Patch applied to svn trunk in r821430
Thanks Lajos!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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