Add date to log file name in Logging Application Block

前端 未结 2 2010
离开以前
离开以前 2021-01-21 12:48

I\'m using the Microsoft Logging Application Block (version 5 beta 2) and I\'m trying to dynamically set the file name of a log file to the year month and day (and then write a

2条回答
  •  隐瞒了意图╮
    2021-01-21 13:13

    I gave up on the Logging Application Block and switched to log4net. Log4net lets me set the name of the log to today's date with a web.config setting. I wrote an article on Code Project that shows how to get log4net working with the Policy Injection Application Block here

提交回复
热议问题