pytest-logger 0.2.0 released

Krzysztof Laskowski krzysztof.laskowski.1986 at gmail.com
Thu Aug 17 13:01:17 EDT 2017


Hi All,

pytest-logger is a pytest plugin putting stdlib logs to:
     - tmpdir directory structure mimicking test suite structure,
     - pytest terminal output in real time, as test progresses.

pypi: https://pypi.python.org/pypi/pytest-logger/0.2.0
repo: https://github.com/aurzenligl/pytest-logger
docs: http://pytest-logger.readthedocs.io

* logs to filesystem in fine-grained way: per-logger and per-testcase
* logs to terminal in real-time: allows cmdline filtering by logger
   and level
* uses pytest hooks as user API, which makes plugin neutral unless
   deliberately hook-configured

     # conftest.py example
     def pytest_logger_config(logger_config):
         '''logs:
         - foo.warn, bar.warn and baz.warn to filesystem,
         - foo.warn, bar.error to terminal
         - allows to change default --log value to any combination
           of loggers and levels
         '''
         logger_config.add_loggers(['foo', 'bar', 'baz'],
                                   stdout_level='warn')
         logger_config.set_log_option_default('foo,bar.error')

I'd happily receive feedback and suggestions via mail or github issues.

Best Regards,
Krzysztof Laskowski


More information about the Python-announce-list mailing list