I'm using the following logging configurations in my code.
LOGGING = {
'version': 1,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'stream': sys.stdout,
}
},
'formatters': {
'simple': {
'format': '%(levelname)s %(asctime)s %(name)s.%(funcName)s:%(lineno)s- %(message)s'
},
},
'root': {
'handlers': ['console'],
'level': 'INFO'
}
}
This is how I log.
logging.config.dictConfig(LOGGING)
logging.info('Hello World!')
The issue is that the format string is not being respected. How can I get the formatter to work?