RollingFileAppender: preserve the file extension without log4net patch

怎甘沉沦 提交于 2020-01-06 05:35:18

问题


M question is related to this one as I have the same problem. How can I make the RollingFileAppender of log4net preserve the file extension without having to actually "patch" (i.e. create an interim build of the current trunk) log4net? How could I achieve the same thing by overriding the RollingFileAppender or creating any other extension with the least effort?


回答1:


As mentioned in my comment, you're not required to "patch" or change anything in log4net. You cannot use the 1.2.10 release, though. It is a rather old build, but the PreserveLogFileNameExtension is in the current source. You only have to bring down the source and compile the dll yourself and you're good to go.

Update: I see your concern. IMO, the only way is to make a build and test it. To further your confidence you could review the current list of resolved (and unresolved) issues for 1.2.11. I would think that seeing they are not doing a major revision, changes are mainly bug fixes and additional features.



来源:https://stackoverflow.com/questions/6643759/rollingfileappender-preserve-the-file-extension-without-log4net-patch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!