Maximum Filesize of LogFileAppender in Log4Net

前端 未结 2 1793
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 15:15

I am using Log4net for a while now and it\'s an amazing logging framework, especially when hooked into Castle.Windsor. However...

I usually use the rolling file app

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 15:26

    The LogFileAppender does not support limiting the output file size (at least in the references I can find). To limit the file size, use a RollingFileAppender and roll on Size and set the file size limit.

    To limit the number of roll over files use the MaxSizeRollBackups attribute

提交回复
热议问题