0

I create a custom level "Custom" with the value 3000, but i cannot log it execpt with the filter value "ALL" for level in the configuration file.

So my question is how can i log for example only "Custom", "ERROR", "FATAL" or "custom" , "INFO" ,"ERROR" ?

<root>
<level value="Custom" />
    <!--<appender-ref ref="DebugAppender" />-->
    <appender-ref ref="sqlAdoNetAppender" />
</root>
kno kno
  • 1
  • 1
  • As in the dupe question, use a LevelMatchFilter for each level you want to allow (with acceptOnMatch set to true) and after them a DenyAllFilter to stop anything with a different level. – stuartd Jun 22 '16 at 21:42
  • You also have to [add the custom level to the config](http://stackoverflow.com/questions/538095/how-do-i-filter-on-a-custom-level-in-log4net/538138#538138) – stuartd Jun 22 '16 at 21:50

0 Answers0