From 312485717b222d11da119a66145cf9f3ac5d6ded Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Fri, 16 Nov 2012 21:39:12 +0100 Subject: [PATCH] Tweak logging standards Link to the Python docs not a blog that paraphrases them, and no need to copy-paste the log levels table into our docs. --- doc/coding-standards.rst | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/doc/coding-standards.rst b/doc/coding-standards.rst index c57922cffc3..647394a3ffa 100644 --- a/doc/coding-standards.rst +++ b/doc/coding-standards.rst @@ -168,36 +168,15 @@ Imports Logging ------- -- Keep messages short. - -- Don't include object representations in the log message. It **is** useful - to include an domain model identifier where appropriate. - -- Choose an appropriate log-level: - - +----------+--------------------------------------------------------------+ - | Level | Description | - +==========+==============================================================+ - | DEBUG | Detailed information, of no interest when everything is | - | | working well but invaluable when diagnosing problems. | - +----------+--------------------------------------------------------------+ - | INFO | Affirmations that things are working as expected, e.g. | - | | "service has started" or "indexing run complete". Often | - | | ignored. | - +----------+--------------------------------------------------------------+ - | WARNING | There may be a problem in the near future, and this gives | - | | advance warning of it. But the application is able to proceed| - | | normally. | - +----------+--------------------------------------------------------------+ - | ERROR | The application has been unable to proceed as expected, due | - | | to the problem being logged. | - +----------+--------------------------------------------------------------+ - | CRITICAL | This is a serious error, and some kind of application | - | | meltdown might be imminent. | - +----------+--------------------------------------------------------------+ - - (`Source - `_) +- Keep log messages short. + +- Don't include object representations in the log message. It *is* useful + to include a domain model identifier where appropriate. + +- Choose an appropriate log-level (DEBUG, INFO, ERROR, WARNING or CRITICAL, + see `Python's Logging HOWTO`_). + +.. _Python's Logging HOWTO: http://docs.python.org/2/howto/logging.html i18n ----