Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question