[logback-dev] [JIRA] Commented: (LBCLASSIC-195) Allow TurboFilters to modify events

Rü (JIRA) noreply-jira at qos.ch
Tue Mar 23 13:48:16 CET 2010


    [ http://jira.qos.ch/browse/LBCLASSIC-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11671#action_11671 ] 

Rü commented on LBCLASSIC-195:
------------------------------

> logback does not support issuing new events from within a filter.

I tried it: It works! You just have to take care of the recursion.

The point I was trying to get to was that the DuplicateMessageFilter could even want to issue two new events while suppressing one. I feel more sympathetic for a Filter to issue new events than to have it change an existing event.

An ObfuscationFilter could be implemented that way, too. But even if you don't, what does it do? The message string, logger, marker, etc. are all probably safe... only the arguments may not. It can only replace a sensitive argument with something safe: a constant like "obfuscated", null, or maybe a toString of the object. And it already can simply replace the values in the args array!!! I don't think this should be a common use case, but it's already possible!

I'd say that the real question is: Does a TurboFilter filter events or parts of an event, namely the args?

> Allow TurboFilters to modify events
> -----------------------------------
>
>                 Key: LBCLASSIC-195
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-195
>             Project: logback-classic
>          Issue Type: Improvement
>          Components: Other
>            Reporter: Ceki Gulcu
>            Assignee: Ceki Gulcu
>            Priority: Blocker
>
> http://qos.ch/pipermail/logback-dev/2010-March/005290.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       


More information about the logback-dev mailing list