docs: Recommend using Python module name as logger name

This commit is contained in:
Stein Magnus Jodal 2014-01-13 22:27:33 +01:00
parent e071a161d6
commit 25e4bc0e30

View File

@ -452,6 +452,9 @@ as this will be visible in Mopidy's debug log::
logger = logging.getLogger('mopidy_soundspot') logger = logging.getLogger('mopidy_soundspot')
# Or even better, use the Python module name as the logger name:
logger = logging.getLogger(__name__)
When logging at logging level ``info`` or higher (i.e. ``warning``, ``error``, When logging at logging level ``info`` or higher (i.e. ``warning``, ``error``,
and ``critical``, but not ``debug``) the log message will be displayed to all and ``critical``, but not ``debug``) the log message will be displayed to all
Mopidy users. Thus, the log messages at those levels should be well written and Mopidy users. Thus, the log messages at those levels should be well written and