pytest-catchlog
py.test plugin to catch log messages. This is a fork of pytest-capturelog.
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release 2016, last commit 2018) and modern pytest (since ~5.0) includes native logging capture via the caplog fixture, making this plugin unnecessary and potentially incompatible with current pytest versions. Install pytest's built-in caplog support instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- This plugin targets older pytest versions and Python 2.6–3.5.
- Modern pytest (7.0+) has native logging capture; this package may conflict or behave unexpectedly with current pytest releases.
- Low install friction with only py and pytest as runtime dependencies.
License · maintenance · safety
MIT License (permissive) — MIT License (permissive) places no significant restrictions on use, modification, or distribution.
last release 2016-01-24 (3855 days) · last repo commit 2018-01-27 · 80 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 82,215 downloads/mo, #14,176 on PyPI
Alternatives
Verify before relying
pip install pytest-catchlog
# In your test file:
import logging
def test_example(caplog):
caplog.set_level(logging.INFO)
logging.info('test message')
assert 'test message' in caplog.text- Compatibility with pytest versions released after 2018; modern pytest includes native caplog fixture that may supersede this plugin.
- Whether the package works reliably with Python 3.6 and later, given the last release was 2016 and classifiers only list up to 3.5.
What it is and what it does
pytest-catchlog is a pytest plugin that intercepts log messages emitted during test execution and displays them in the test output when tests fail. It provides a caplog fixture that lets you set log levels, format log output, and access captured log records and text within your tests. The plugin was originally a fork of pytest-capturelog and supports both Python 2 and Python 3.
The package integrates logging capture into pytest's standard output capture mechanism, showing logs alongside stdout and stderr in failure reports. You can customize log formatting via command-line options or pytest configuration files, disable log reporting entirely, and programmatically inspect or filter captured records within test code. However, modern pytest versions have absorbed this functionality into the core caplog fixture, making this package largely redundant for current projects.
Use it for
- Debugging test failures by examining log output that was emitted during the test run.
- Asserting on the content and severity of log messages within test code using caplog.records or caplog.text.
- Customizing log message format and timestamps in pytest output for specific testing workflows.
- Testing legacy code bases that require Python 2.6–3.5 and an older pytest version with explicit log capture.
- Temporarily adjusting log levels within a test using caplog.at_level() context manager.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release 2016, last commit 2018) and modern pytest (since ~5.0) includes native logging capture via the caplog fixture, making this plugin unnecessary and potentially incompatible with current pytest versions. Install pytest's built-in caplog support instead.
Install
pytest-catchlog on PyPI
Before you install
Low install friction with only py and pytest as runtime dependencies. However, the package is abandoned—last commit was 2018-01-27 and no releases since 2016-01-24. Modern pytest versions have integrated logging capture natively, making this plugin largely obsolete.
This plugin targets older pytest versions and Python 2.6–3.5. Modern pytest (7.0+) has native logging capture; this package may conflict or behave unexpectedly with current pytest releases.
License in practice
MIT License (permissive) places no significant restrictions on use, modification, or distribution.
Quickstart
pip install pytest-catchlog
# In your test file:
import logging
def test_example(caplog):
caplog.set_level(logging.INFO)
logging.info('test message')
assert 'test message' in caplog.text
Verify before relying
- Compatibility with pytest versions released after 2018; modern pytest includes native caplog fixture that may supersede this plugin.
- Whether the package works reliably with Python 3.6 and later, given the last release was 2016 and classifiers only list up to 3.5.
Package facts
| License | MIT License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespypytest |
| Maintenance | Abandoned 3,855 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,215 / month, #14,176 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing |
Evidence: pytest_catchlog-1.2.2-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest log capture plugin”
- pytest-catchlogA pytest plugin that automatically captures log messages during test…
- pytest-loggerPytest-logger is a pytest plugin that configures Python logging…
- pytest-loguruExtends pytest's caplog fixture to capture and assert on logs…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-logger · pytest-loguru · pytest_tagging · pytest-progress · pytest-harvest · pytest-pytestrail · pytest-cagoule · pytest-grpc · pytest-ordering · pytest-cache