开发者

Creating an application and event logs in the "applications and services logs" section of the event viewer

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?

Thanks!


You can create a log entry with this method :

public static void CreateEventSource(
    string YourApplication,
    string YourLogName    )

CreateEventSource

Doc: 1: http://msdn.microsoft.com/en-us/library/2awhba7a.aspx

Example :Eventlog

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜