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

Joern Huxhorn (JIRA) noreply-jira at qos.ch
Fri Mar 19 15:21:16 CET 2010


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

Joern Huxhorn edited comment on LBCLASSIC-195 at 3/19/10 3:20 PM:
------------------------------------------------------------------

I'm not very fond about forcing a change of config files, either.

This could be avoided quite easily though, simply by keeping the layout-setter in appender and having

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>testFile.log</file>
    <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>%msg%n</pattern>
    </layout>
</appender>

initialize as if it were actually

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>testFile.log</file>
    <encoder>
      <pattern>%msg%n</pattern>
    </encode>
</appender>

i.e. wrapping the given layout into an appropriate LayoutWrappingEncoder and setting that to the appender.

One could also emit a (deprecation) warning in that case but I see no reason why this behavior shouldn't be kept indefinitely.

      was (Author: jhuxhorn):
    I'm not very fond about forcing a change of config files, either.

This could be avoided quite easily though, simply by keeping the layout-setter in appender and having

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>testFile.log</file>
    <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>%msg%n</pattern>
    </layout>
</appender>

initialize as if it where actually

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>testFile.log</file>
    <encoder>
      <pattern>%msg%n</pattern>
    </encode>
</appender>

i.e. wrapping the given layout into an appropriate LayoutWrappingEncoder and setting that to the appender.

One could also emit a (deprecation) warning in that case but I see no reason why this behavior shouldn't be kept indefinitely.
  
> 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