RollingFileAppender:保留文件扩展名而无需log4net补丁 [英] RollingFileAppender: preserve the file extension without log4net patch

查看:128
本文介绍了RollingFileAppender:保留文件扩展名而无需log4net补丁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

M问题与该问题有关,因为我有同样的问题.如何使log4net的RollingFileAppender保留文件扩展名,而不必实际修补"(即创建当前主干的临时版本)log4net?如何通过覆盖RollingFileAppender或以最少的努力创建任何其他扩展来实现同一目的?

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?

推荐答案

PreserveLogFileNameExtension在当前来源中.您只需要关闭源代码并自己编译dll,就可以了.

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.

更新:我看到您的关注. IMO,唯一的方法是进行构建并对其进行测试.为了进一步增强信心,您可以查看

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.

这篇关于RollingFileAppender:保留文件扩展名而无需log4net补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆