禁用第三方 dll 中的 log4net 日志记录

发布于 2024-10-09 10:42:58 字数 234 浏览 0 评论 0原文

我正在使用 log4net 日志记录开发 WPF 应用程序。 还使用一个第三方 DLL 来读取 SWF 文件。 该 DLL 是使用 log4net 日志记录开发的。

在我的应用程序中使用 swf 读取功能时,我注意到第三方 dll 登录到我的应用程序日志文件中的信息约为 7MB。因此,我的应用程序日志文件大小急剧增加。

有没有办法从我的应用程序配置文件中禁用第三方 dll 日志记录?我没有这个第三方dll的源代码。

I am working on WPF application with log4net logging.
Also using one third party DLL for SWF file reading purpose.
This DLL was developed with log4net logging.

When working with swf reading functionality in my application i have noticed that around 7MB of information logging in to my application logfile by third party dll. Because of this my application logfile size is increasing drastically.

Is there any way to disable that third party dll logging from my application configuration file? I don't have source code of this third party dll.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你げ笑在眉眼 2024-10-16 10:42:58

下载 .NET 反射器。使用它来确定第三方应用程序使用的包根目录是什么。如果是 Com.Thirdparty,则将其放入您的 log4net 配置中:

<logger name="Com.Thirdparty">
    <level value="OFF" />
</logger>

Download .NET reflector. Use it to determine what's the package root used by third party application. If it's Com.Thirdparty, then put this into your log4net configuration:

<logger name="Com.Thirdparty">
    <level value="OFF" />
</logger>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文