在Windows Server 2008上的EventViewer中记录日志 [英] Record log in EventViewer on Windows server 2008
本文介绍了在Windows Server 2008上的EventViewer中记录日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友,
我想在eventviewer中记录到server2008上的日志.
最终它会自动记录每个事件,但是我想要的是通过C#应用程序记录一个新事件.
有没有可能实现这一目标的选择?
请尽快帮助我.
提前谢谢.
关于问候
R.K.
Hi friends,
I want to record a log onto server2008 in eventviewer.
Eventually its recording each and every events automatically, but what i want is to log a new event through my C# application.
Is there any option that is possible to achieve this?
Please help me ASAP.
Thanks in advance.
With regards
R.K.
推荐答案
您需要使用EventLog类将错误消息记录到系统eventviewer
更多详细信息 http://msdn.microsoft.com/en-us/library/system. diagnostics.eventlog.aspx [ ^ ]
You need to use the EventLog class to log the error message to system eventviewer
More details http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx[^]
这篇关于在Windows Server 2008上的EventViewer中记录日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文