How to log different log level to different log appender in log4net

后端 未结 2 1364
挽巷
挽巷 2020-12-31 02:11

I have a WinForm that it display log information but I want it to display to only INFO level but I want the log in the log file to contain DEBUG level as well.

Bel

2条回答
  •  执笔经年
    2020-12-31 03:10

    You should be able to add a filter to both of your appenders.

    
             
             
    
    

    This way one appender will only log to a certain level while the other to a different level even though they are defined by the same logger.

提交回复
热议问题