Tuesday, May 15, 2007

logging/tracing guidelines

I use log4net for logging/tracing, this is the current guideline:
  • Debug – Used for the developer him-/herself during development
  • Info – Used to leave an execution trail of the code. Useful for orientation after an error has occurred run time, in particular where the stack-trace does not capture the complete history of the operation
  • Warning – Used to flag a problem that is external to the code in question, e.g. related to incorrect calling parameters. It is not perceived that the next call will generate an error.
  • Error – Used to flag an internal error, when a unperceived problem occurs within the code, the operation fails
  • Fatal Error – Used to flag an error that makes it impossible for the component to continue operation. This typically happens at startup when the component is not able to initialize correctly, e.g. because there is no connection to the database which contains the component’s configuration

No comments: