NLog rotate and cleanup logfiles

前端 未结 2 1616
生来不讨喜
生来不讨喜 2020-12-13 18:54

Within my company we\'re working with NLog. We\'re experiencing issues with large amount of log files. What we want to do is archive files by day and keep a maximum of an x

2条回答
  •  青春惊慌失措
    2020-12-13 19:27

    It looks like the problem is the shortdate in your filename definition. See my answer at this question: Delete log files after x days

    You have to define the filename without the date part

    fileName="${basedir}/logs/Log.info.txt
    

提交回复
热议问题