I'm trying to log some info messages specifically in django settings.py. I'm following the first example in the django documentation that shows a simple configuration. The only thing I changed was having the log show INFO level messages. When I run python manage.py runserver
, the log statement is never shown. The logs are only shown for WARNING level or above (more critical).
Here is my configuration that is located in settings.py
import logging
...
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'': {
'handlers': ['console'],
'level': 'INFO',
'propagate': True
},
}
...
def do_something():
logger.info('Doing Something')
do_something()
Note I'm trying to log statements only in my settings.py file as of right now.