[ 
https://issues.apache.org/jira/browse/LOG4NET-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103699#comment-13103699
 ] 

Adam Davies commented on LOG4NET-314:
-------------------------------------

I can add a theshold constraint if desired, and rename the MAX / MIN.  My only 
concern with adding the theshold constraint to a pattern converter is the same 
goal can be achieved with the <Filter> element at the appender level.  The 
Filter element also gives us the capability to set the max and min levels.  As 
in

<?xml version="1.0" encoding="utf-8"?>
<log4net 
xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >
        <appender name="ConsoleAppender" 
type="log4net.Appender.ConsoleAppender">
                <filter type="log4net.Filter.LevelRangeFilter" >
                        <levelMax value="WARN"/>
                        <levelMin value="DEBUG"/>
                </filter>
                <layout type="log4net.Layout.PatternLayout">
                        <conversionPattern value="%stacktracedetail{-1|1}" />
                </layout>
        </appender>
</log4net>



Suggestions / comments?

> Improve StackTracePatternConverter
> ----------------------------------
>
>                 Key: LOG4NET-314
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-314
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2.11
>            Reporter: Stefan Bodewig
>             Fix For: 1.2 Maintenance Release
>
>
> LOG4NET-154 contains a patch that would introduce a MIN-Option to skip a 
> certain number of stack traces that didn't make it into 1.2.11.
> There also is Lars' comment ( 
> https://issues.apache.org/jira/browse/LOG4NET-154?focusedCommentId=12710413&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12710413
>  ) that shows other possible improvements.
> Personally I'm not convinved MIN is the right name for the option in Adam's 
> patch (skip feels more natural but I'm notoriously bad at names).  Also I'd 
> prefer some sort of key-value option string as we expect more improvements 
> and the pipe-syntax likely won't scale.  Something like 
> %stacktrace{frames:3,skip:2,threshold:WARN}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to