Ian Brandt commented on Improvement LOGBACK-841

Makes sense. My Log4J config was like this:

Logger to be filtered -> AsyncAppender (with filters)
                                |
                                |-> ConsoleAppender
                                |
                                |-> RollingFileAppender
                                |
Other Loggers ---------> AsyncAppender (without filters)

The idea was to eliminate the filtering for all but the loggers that are known to need it.

If I push the "fork" up to the loggers then I'd end up with 4 {{AsyncAppender}}s instead of 2, and 2 of those appenders would have identical configurations duplicated including filter duplication. For any more sets of filters add 2 more {{AsyncAppender}}s each.

Would a synchronous "Tee" appender—that is an appender that synchronously copies its events to all attached appenders—be a sensible workaround?

Logger to be filtered -> TeeAppender (with filters)
                                |
                                |-> AsyncAppender -> ConsoleAppender
                                |
                                |-> AsyncAppender -> RollingFileAppender
                                |
Other Loggers ---------> TeeAppender (without filters)

Or am I going about this all wrong?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira