I want to add request and user ids with logs of my Django project. Ways I found on internet need me to send extra request with every logger call like this,
logger.info('This is my info log line', extras={ 'request', request })
But I don't want to modify every existing logger call. Is it possible to this with handlers/formatters?
Aucun commentaire:
Enregistrer un commentaire