You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/21 07:10:57 UTC
[jira] [Commented] (LOG4NET-518) Filters don't work when use
multiple.
[ https://issues.apache.org/jira/browse/LOG4NET-518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15341264#comment-15341264 ]
ASF GitHub Bot commented on LOG4NET-518:
----------------------------------------
GitHub user efenghuo opened a pull request:
https://github.com/apache/log4net/pull/27
fixed issue LOG4NET-518.
when filter passed, should return accept or neutral(then next filter to work),else return deny
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/efenghuo/log4net trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/log4net/pull/27.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #27
----
commit e86b0fb87b3efec5a9ccfe0c6213436c82d230db
Author: yanhuiqiang <i...@efenghuo.com>
Date: 2016-06-21T07:05:28Z
fixed issue LOG4NET-518.
----
> Filters don't work when use multiple.
> -------------------------------------
>
> Key: LOG4NET-518
> URL: https://issues.apache.org/jira/browse/LOG4NET-518
> Project: Log4net
> Issue Type: Bug
> Components: Other
> Affects Versions: 1.2.15
> Reporter: huiqiang yan
>
> I have an application managed multiple AppDomains, and my master application can get messages from all appDomain, then log them separately.
> I create appenders from each appDomains and use the 'domain name’ and 'log level' to discriminate。
> RollingFileAppender appender = new RollingFileAppender();
> appender.AddFilter(new LevelRangeFilter
> {
> LevelMin = Level.Info,
> LevelMax = Level.Info,
> AcceptOnMatch = false,
> Next = new LoggerMatchFilter
> {
> LoggerToMatch = name,
> AcceptOnMatch = true
> }
> });
> when name doesn't match, the If statement in filter LoggerMatchFilter file at line 140 ,I think it means match or doesn't match, it should be deny in else statement.
> AcceptOnMatch only use when the match is passed ,it means if should return Accept when matched,and when it is false then return Neutral.
> Not only LoggerMatchFilter has this problem, others too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)