在创建应用程序和事件日志中的"应用程序和服务日志"事件查看器的部分 [英] Creating an application and event logs in the "applications and services logs" section of the event viewer
问题描述
我在我想写未处理事件事件查看器.NET应用程序。我注意到,有一个名为应用程序和服务日志目录。我想创建这个目录在我的应用程序的条目,编写任何未处理的事件吧。不幸的是,我无法找到任何文件。
I have a .NET application in which I want to write unhandled events to the event viewer. I noticed that there is a directory called "Applications and Services Logs". I would like to create an entry for my application in this directory and write any unhandled events to it. Unfortunately, I can't find any documentation.
这甚至可能吗?如果是这样,怎么样?
Is this even possible? If so, how?
谢谢!
推荐答案
您可以创建使用这种方法的日志条目:
You can create a log entry with this method :
public static void CreateEventSource(
string YourApplication,
string YourLogName )
文件:的 1 :的 http://msdn.microsoft.com/en-us/library/2awhba7a.aspx
例如:<一HREF =http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx相对=nofollow>事件日志
这篇关于在创建应用程序和事件日志中的"应用程序和服务日志"事件查看器的部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!