Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #2597 > unrolled thread

pytest-logger 0.2.0

Started byKrzysztof Laskowski <aurzenligl@gmail.com>
First post2017-08-14 18:17 +0200
Last post2017-08-14 18:17 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python.announce

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  pytest-logger 0.2.0 Krzysztof Laskowski <aurzenligl@gmail.com> - 2017-08-14 18:17 +0200

#2597 — pytest-logger 0.2.0

FromKrzysztof Laskowski <aurzenligl@gmail.com>
Date2017-08-14 18:17 +0200
Subjectpytest-logger 0.2.0
Message-ID<mailman.42.1502810152.2689.python-announce-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python.announce


csiph-web