Write to the event log in a .net project

本文介绍如何在app.config文件中启用应用程序事件日志记录功能,通过简单的配置更改即可使用该功能来记录调试和错误信息,替代传统的文本文件记录方式。
  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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值