dpsenner commented on a change in pull request #43: Enhance the filter to
support filter the exception type name.
URL: https://github.com/apache/logging-log4net/pull/43#discussion_r243731399
##########
File path: src/Filter/ExceptionTypeFilter.cs
##########
@@ -0,0 +1,54 @@
+using log4net.Core;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace log4net.Filter
+{
+ public class ExceptionTypeFilter : FilterSkeleton
+ {
+ public ExceptionTypeFilter()
+ {
+ this.AcceptOnMatch = true;
+ }
+
+ /// <summary>
+ /// Set the exception type name to filter
+ /// </summary>
+ public string ExceptionTypeName { get; set; }
+
+ /// <summary>
+ /// <see cref="FilterDecision.Accept"/> when matching <see
cref="ExceptionTypeName"/>
+ /// Default value is true.
+ /// </summary>
+ public bool AcceptOnMatch { get; set; }
+
+ public override FilterDecision Decide(LoggingEvent loggingEvent)
Review comment:
Please add documention that explains the expected behavior. Any public api
endpoint requires a docstring.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services