A
A
albertalexandrov2019-10-03 17:36:58
Django
albertalexandrov, 2019-10-03 17:36:58

How to set exc_info=True for all loggers?

Hello.
It's about the standard library logging.
Please suggest how you can set exc_info=True for all loggers. This option specifies to attach a stacktrace to the log message. Without it, there is only a message passed to logger.info(message), logger.debug(message), etc. I thought I might do the initial configuration in settings.py using logging.basicConfig(), but this function does not accept such a parameter.
Currently working version:
logger.info(сообщение, exc_info=True)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question