I try to apply this to my logger statements. For example:<p><pre><code> unless signals.has_key? key.to_sym
logger.error("wrong signal received: #{key.inspect} not in #{signals.inspect}")
raise ActiveRecord::RecordNotFound
</code></pre>
Classifying what's an `error`, `warning` and `info` can be confusing some times, but I have quite clear guidelines, and it helps to better deal with errors overall.<p>error/fatal - anything that I simply can't recover from. e.g. if a parameter is missing, there's no way to even guess. error logging is almost always accompanied by an exception being raised. (btw, on our rails app we use the logging-rails[1] gem, that emails those errors to us)<p>warning - something seems wrong, but we can somehow still continue, or it's an error that I don't want an email about. For example, blocking spam on a form submission.<p>info - useful stuff to know what's going on with the app. User registered / logged in, payment received. Those are also sent to graphite for measuring<p>debug - all the other stuff you need when writing code.<p>[1]<a href="https://github.com/TwP/logging-rails" rel="nofollow">https://github.com/TwP/logging-rails</a>