Log4Net configuring log level

后端 未结 5 653
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 20:03

How do I make Log4net only log Info level logs? Is that even possible? Can you only set a threshold?

This is what I have, and it logs Info and above as I would expect.

5条回答
  •  隐瞒了意图╮
    2021-01-30 20:32

    Yes. It is done with a filter on the appender.

    Here is the appender configuration I normally use, limited to only INFO level.

    
      
      
      
      
           
      
      
      
            
      
    
      
            
            
      
        
    

提交回复
热议问题