log4net one file per run

后端 未结 3 1915
刺人心
刺人心 2020-12-01 06:07

I need my application to create a log file each time it runs.

My preferred format would be App.log.yyyy-MM-dd_HH-mm-ss. If that\'s not possible, I\'

3条回答
  •  隐瞒了意图╮
    2020-12-01 06:45

    I assume that the application should create only one log file every time it runs, so you do not need a rolling file appender (though my solution would apply for rolling file appenders as well):

    
        
        
        
            
        
    
    

    (Obviously you can use other your own layout and other settings for the file appender.)

提交回复
热议问题