I have a Python Django app where we need to log using below code snippet to allow ELK to index the log record as JSON
logger.info(json.dumps({'level':'INFO','data':'some random data'})
I have to use json.dumps() everytime . Is there a way in logging module to get rid of json.dumps() in every log message but still achieve the same functionality