不要在事件查看器中写入日志 [英] Do not write logs in event viewer

查看:158
本文介绍了不要在事件查看器中写入日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我确实有第三方C#Exe执行某些操作。我用Program.Start调用它。当Exe执行时,它会将日志写入事件查看器。



我的问题是我们可以防止第三方EXE不应该在事件查看器中写入任何单个日志,因为人们在抱怨这个Exe运行到他们的系统的地方。



有什么方法可以阻止这个吗?

Hello guys,

I do have a third party C# Exe to perform some operation. I do call it using Program.Start. When that Exe executes, it writes log to event viewer.

My question is that can we prevent that the third party EXE should not write any single log in the event viewer, because people are complaining where this Exe is running on to their system.

Is there any way to prevent this??

推荐答案

这就是为什么在没有源代码的情况下使用某些第三方代码真的很糟糕的原因之一。我建议一定要避免它。顺便说一下,这个问题与注册表无关(感谢优点,现在越来越多的软件产品不再污染系统注册表了,但有些人会这样做。)



当然,有问题的应用程序可能会关闭日志记录,这通常在* .config文件中完成,但1)我相信你已经探索过这个机会,你不会问这个问题如果你能找到方向; 2)您没有提供有关此应用程序的任何相关信息以帮助解决此问题。



原则上,如果没有其他方式并且相关应用程序是.NET应用程序,您可以轻松地对其进行反向工程,删除日志记录并重新编译它。为此,可以使用Reflector或更好的开源ILSpy。请参阅:

http://en.wikipedia.org/wiki/.NET_Reflector [ ^ ],

http://ilspy.net [ ^ ]。



-SA
This is one of the reasons why it's really bad to use some 3rd-party code without source code. I would advise to avoid it by all means. By the way, the problem has nothing to do with registry (thanks goodness, more and more software products these days don't contaminate system registry anymore, but some do).

Of course, it could be possible that the application in question has provisions to switch off the logging, which is typically done in the *.config file, but 1) I believe you already explored this opportunity and you would not ask this question if you could find the way; 2) you did not provide any relevant information on this application to help with this.

In principle, if there are no other way and if the application in question is a .NET application, you can easily reverse-engineer it, remove logging and recompile it. For this purpose, Reflector or, better, open-source ILSpy can be used. Please see:
http://en.wikipedia.org/wiki/.NET_Reflector[^],
http://ilspy.net[^].

—SA


You said that you have been using some third party componet to call an EXE file.I believe that there might be some settings in the configuration file.

Did you check web.config or any other configuration file?


这篇关于不要在事件查看器中写入日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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