Peter, When we were first getting started, I received this general reply which helped us put things into perspective.
The following is from an email from Rich Denis @ Perot Systems in response to my question on the Log4Net listserver about what levels to log what types of errors. Its really personal preference. Some people I know, me included don't use Fatal except for application initialization failures. Here is generally how I use things: DEBUG - Anything that I want to see for app tracing, such as method starts and stops. INFO - Things that I may generally not want to get logged into production but may want to know such as a total count on a collection etc. WARN - I generally use WARN when I have recovered from an expected exception or when I was expecting to find a configuration value that was not there but I supplied a default that was hard coded. ERROR - Exceptions that I have caught that I can not recover from. FATAL - many of my apps have a startup method that tries to read from configs and do a bunch of work before the app can even start. If I experience an error here I will log FATAL if the error does not occur here I just log an ERROR. Further, in production I generally log WARN and above. So as a rule I only require that developers check IsDebugEnable and IsInfoEnabled. All other types I just log without checking. -----Original Message----- From: Peter A. Kirk [mailto:[EMAIL PROTECTED] Sent: Friday, September 02, 2005 4:49 AM To: [email protected] Subject: What log level to use? Hi there Are there any recommendations or general guidelines for when to use what logging level? I never know when to use log.Debug("blah") vs log.Info("blah") or ERROR vs FATAL for example. Thanks, Peter DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message.
