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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2013/03/31 10:13:18 UTC
[jira] [Resolved] (LOG4J2-188) The "appender-ref" functionality
doesn't work perfectly in the AsynchAppender
[ https://issues.apache.org/jira/browse/LOG4J2-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralph Goers resolved LOG4J2-188.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.0-beta5
Assignee: Ralph Goers
Fixed in revision 1462895. Please verify and close.
> The "appender-ref" functionality doesn't work perfectly in the AsynchAppender
> -----------------------------------------------------------------------------
>
> Key: LOG4J2-188
> URL: https://issues.apache.org/jira/browse/LOG4J2-188
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.0-beta4
> Reporter: Werner
> Assignee: Ralph Goers
> Priority: Minor
> Fix For: 2.0-beta5
>
>
> The full "appender-ref" function (level & filter) doesn't work at the AsynchAppender like in the Logger-Configuration.
> <Asynch name="AsynchTest" blocking="true" bufferSize="2" error-ref="xy" suppressExceptions="true">
> <appender-ref ref="ListAppender" /> <== do the job
>
> <appender-ref ref="ErrorAppender" level="Error" /> <== don't work
>
> <appender-ref ref="FilterAppender" level="Error"> <== don't work
> <MarkerFilter marker="TEST" onmatch="accept" onmismatch="deny" />
> </appender-ref>
> </Asynch>
> proposal for solution:
> AsynchAppender.java : line 79
> @Override
> public void start() {
> final Map<String, Appender> map = config.getAppenders();
> final List<AppenderControl> appenders = new ArrayList<AppenderControl>();
> for (final AppenderRef appenderRef : appenderRefs) {
> if (map.containsKey(appenderRef.getRef())) {
> // appenders.add(new AppenderControl(map.get(appenderRef.getRef()), null, null));
> // new =>
> appenders.add(new AppenderControl(map.get(appenderRef.getRef()), appenderRef.getLevel(), appenderRef.getFilter()));
> ...
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org