Turning tracing off via app.config

后端 未结 6 1947
孤独总比滥情好
孤独总比滥情好 2020-12-08 05:20

I\'m trying to use System.Diagnostics to do some very basic logging. I figure I\'d use what\'s in the box rather than taking on an extra dependency like Log4Net or EntLib. <

6条回答
  •  温柔的废话
    2020-12-08 05:36

    Try this simple solution. In example below, "SomeNoisyLibrary" is littering the log with many useless entries. We filter them with "when condition"

    https://github.com/NLog/NLog/wiki/When-Filter

    
    
      
        
        
      
    
      
        
          
            
          
        
      
    
    

提交回复
热议问题