log4net: Configure to ignore messages from a specific class

前端 未结 5 817
孤独总比滥情好
孤独总比滥情好 2020-12-02 15:24

Is there a way to have the log4net configuration ignore a specific class? For example, we generally create a log in every class. Similar to this:

private sta         


        
5条回答
  •  天命终不由人
    2020-12-02 15:37

    Sure, use a filter.

    Here's the snippet posted on the blog, for future reference - all credit to the author of that blog post:

    
      
      
    
    
      
      
      
    
    

提交回复
热议问题