开发者

Standard for Windows Event Logging: Log nothing vs. Info vs. Warning vs. Error?

开发者 https://www.devze.com 2022-12-19 15:59 出处:网络
When should I log a message to the event log?Is there an accepted best practice for whether a particular event...

When should I log a message to the event log? Is there an accepted best practice for whether a particular event...

  • Needs to be logged to the event log at all
  • Is an error or a warning
  • Is important enough info to logged as an info event in th开发者_Python百科e event log


There's no single standard.

  • Log as informational if you have something to say that you think someone might possibly read.
  • Log as a Warning if you have something to say that you think someone should know about.
  • Log as an Error if you have something to say that you think someone should be informed about immediately. An Error should be something that might cause someone to be awakened early in the morning to deal with it.

As you can see from the above, I think you should log when you have something to say.


This is what I was looking for...

http://msdn.microsoft.com/en-us/library/aa363662%28VS.85%29.aspx

0

精彩评论

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

关注公众号