Thursday, 11 October 2018

Change log level in unittest

I have the impression (but do not find the documentation for it) that unittest sets the logging level to WARNING for all loggers. I would like to:

  • be able to specify the logging level for all loggers, from the command line (when running the tests) or from the test module itself
  • avoid unittest messing around with the application logging level: when running the tests I want to have the same logging output (same levels) as when running the application

How can I achieve this?



from Change log level in unittest

No comments:

Post a Comment