{"id":23153,"library":"pytest-logging","title":"pytest-logging","description":"Configures logging for pytest and allows tweaking the log level via command-line flags. Current version is 2015.11.4. The package has been in maintenance mode for years and is largely superseded by built-in pytest logging since pytest 3.3+.","status":"maintenance","version":"2015.11.4","language":"python","source_language":"en","source_url":"https://github.com/saltstack/pytest-logging","tags":["pytest","logging","plugin","testing"],"install":[{"cmd":"pip install pytest-logging","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"note":"Commonly imported as a plugin; no manual import needed if installed.","wrong":"","symbol":"pytest_logging","correct":"import pytest_logging"}],"quickstart":{"code":"# pytest.ini or setup.cfg\n[pytest]\nlog_cli = true\nlog_level = DEBUG\n\n# Then run tests with: pytest -s --log-level=DEBUG","lang":"ini","description":"Configure logging via pytest.ini and use --log-level flag. Note: built-in pytest logging is preferred."},"warnings":[{"fix":"Remove pytest-logging and use pytest's built-in logging configuration.","message":"pytest-logging is effectively deprecated; built-in pytest logging (pytest >=3.3) offers richer functionality. Consider using pytest's -o log_cli=true or log_cli_level.","severity":"deprecated","affected_versions":"all"},{"fix":"Use only one mechanism to avoid confusion.","message":"The --log-level flag conflicts with pytest's built-in --log-cli-level; both may interfere.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install pytest-logging and ensure it's in the test environment.","cause":"Old package expects installed plugin; sometimes missing from environment.","error":"ModuleNotFoundError: No module named 'pytest_logging'"},{"fix":"Update Python to 2.7+ or use built-in logging.","cause":"In rare cases, this error appears due to incompatible Python version (log level manipulation).","error":"AttributeError: module 'logging' has no attribute 'addLevelName'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}