现在的位置: 首页 > 综合 > 正文

Write to the event log in a .net project

2019年10月07日 ⁄ 综合 ⁄ 共 432字 ⁄ 字号 评论关闭
 The Application Event Log that is commented out in the app.config file。

allows you to write to the event log, for debug/error info, instead of writing a text file:

http://www.samspublishing.com/articles/article.asp?p=606221&seqNum=4&rl=1

Once you uncomment all you have to do is:

Application.Log.WriteEntry("Something disasterous happened in my app :)", TraceEventType.Information);

Before you had to use a component from the toolbox, this is now available straight out of the box in the my namespace

抱歉!评论已关闭.