Log4Net configuring log level

后端 未结 5 731
爱一瞬间的悲伤
爱一瞬间的悲伤 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:21

    Use threshold.

    For example:

       
            
            
            
            
            
            
            
            
                
                
                
            
        
        
            
            
                
            
        
        
            
            
                
            
        
    

    In this example all INFO and above are sent to Console, all WARN are sent to file and ERRORs are sent to the Event-Log.

提交回复
热议问题