Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #2605
| From | Krzysztof Laskowski <krzysztof.laskowski.1986@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python.announce |
| Subject | pytest-logger 0.2.0 released |
| Date | 2017-08-17 19:01 +0200 |
| Message-ID | <mailman.126.1503144231.2689.python-announce-list@python.org> (permalink) |
| References | <2c2da308-985d-c1b0-441f-33a81456fb0a@gmail.com> |
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
Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread
pytest-logger 0.2.0 released Krzysztof Laskowski <krzysztof.laskowski.1986@gmail.com> - 2017-08-17 19:01 +0200
csiph-web