I hope to add the following log items to my application and display the full extra contents on the console, for example
logger.info('Status', extra={'foo':data}) logger.info('Status', extra={'bar':data}) logger.info('Status', extra={'foo':data, 'bar':data})
and I hope to see:
2016-10-10 15:28:31,408, INFO, Status, foo=data 2016-10-10 15:38:31,408, INFO, Status, bar=data 2016-10-10 15:48:31,408, INFO, Status, foo=data, bar=data
Is it possible? According to the official registration documentation, Formatter should be configured with a format string that expects foo and bar , but in my case all I want to do is unload all kwargs extra without prior knowledge of foo and bar .
Cjlam source share