This is my settings module:
LOGGING = {
\'version\': 1,
\'disable_existing_loggers\': False,
\'handlers\': {
\'file\': {
\'level\': \'DEBU
Your logging configuration only captures logs within the django
namespace.
This line:
logger = logging.getLogger(__name__)
... tells the logger to use your module's name as the namespace for these logs (docs). If your module is called mymodule
, then you can catch these logs by adding something like this to your logging configuration:
'loggers': {
'django' : {...},
'mymodule': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},