1. memedough
  2. pytest-capturelog
Issue #2 new

Control logging level from command line

Renato Alves
created an issue

It is often useful to control which logging level you want to use on a given test run outside the actual code.

It's also considered bad practice to have the actual code setting their own logging level, which if set globally makes it hard to control externally.

I couldn't find a way to achieve this using py.test and pytest-capturelog is the most logical place to have this option. Therefore I ask if an option --log-level can be added, accepting one of the standard logging levels: DEBUG, INFO, WARNING, ERROR, FATAL.

Cheers

Comments (0)

  1. Log in to comment