Skip to content

Instantly share code, notes, and snippets.

@sentenza
Created February 5, 2014 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sentenza/8831443 to your computer and use it in GitHub Desktop.
Save sentenza/8831443 to your computer and use it in GitHub Desktop.
Every Python logger is a child of parent's module logger. It is possible to configure the logger via the init module and it is the easiest way to do so.
import logging.config
logging.config.fileConfig('logging.conf')
log = logging.getLogger(__name__)
from logging
log = logging.getLogger(__name__)
@sentenza
Copy link
Author

sentenza commented Feb 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment