human
How do I add custom field to Python log format string?
assistant
Here is some code to log info message 'Log message' with attributes `{'app_name': 'myapp'}`

logging.info('Log message', extra={'app_name': 'myapp'})

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.