You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Simon Wallis <ma...@wallis.ca> on 2005/01/10 16:04:43 UTC

when to use each log level

Hi,

I would like to set some guidelines for developers in my team on when each logging level should be used. Can someone who's been using this for a while provide some guidance?

Eg.,
FATAL - use when a critical system failure happens. This is a situation where someone would want to be paged in the middle of the night to fix.

ERROR - for recording exceptions and other definite problem situations. You might not need to be paged in the middle of the night, but this is important enough that an email should be sent to a mailbox that's monitored on a regular basis. Recurring errors need immediate attention.

WARN - ???

INFO - ???

DEBUG - self-explanitory. Basic debugging statements that someone would only care about if they were investigating a problem with your component.

The situation I want to avoid is developers logging things as errors when they're not that important, or conversely some people logging everything as debug events.

Another question: what is the minimum log level that most people turn on in production? Just errors or all levels of logging?

Thanks for your guidance,
Simon.