title: pytest: selective log levels on a per-module basis
body: <p>I'm using pytest-3.7.1 which has good support for logging, including live logging to stdout during tests. I'm using <code>--log-cli-level=DEBUG</code> to dump all debug-level logging to the console as it happens.</p>
  
  <p>The problem I have is that <code>--log-cli-level=DEBUG</code> turns on debug logging for <em>all</em> modules in my test program, including third-party dependencies, and it floods the log with a lot of uninteresting output.</p>
  
  <p>Python's logging module has the ability to set logging levels per module. This enables selective logging - for example, in a normal Python program I can turn on debugging for just one or two of my own modules, and restrict the log output to just those, or set different log levels for each module. This enables turning off debug-level logging for noisy libraries.</p>
  
  <p><strong>So what I'd like to do is apply the same concept to pytest's logging - i.e. specify a logging level, from the command line, for specific non-root loggers</strong>. For example, if I have a module called <code>test_foo.py</code> then I'm looking for a way to set the log level for this module <em>from the command line</em>.</p>
  
  <p>I'm prepared to roll-my-own if necessary (I know how to add custom arguments to pytest), but before I do that I just want to be sure that there isn't already a solution. Is anyone aware of one?</p>