Skip to content

Comments

fix: add pytest plugin for caplog integration#97

Open
svaningelgem wants to merge 1 commit intomasterfrom
claude/fix-logprise-logcap-S5zBD
Open

fix: add pytest plugin for caplog integration#97
svaningelgem wants to merge 1 commit intomasterfrom
claude/fix-logprise-logcap-S5zBD

Conversation

@svaningelgem
Copy link
Owner

  • Create pytest plugin that forwards loguru logs to caplog fixture
  • Register plugin as pytest11 entry point so it loads automatically
  • Bypass standard logging to avoid recursion with InterceptHandler
  • Support caplog level filtering via at_level() context manager
  • Add comprehensive tests for caplog integration

Closes #94 : logs output via logprise don't show up in caplog.

- Create pytest plugin that forwards loguru logs to caplog fixture
- Register plugin as pytest11 entry point so it loads automatically
- Bypass standard logging to avoid recursion with InterceptHandler
- Support caplog level filtering via at_level() context manager
- Add comprehensive tests for caplog integration

Closes the issue where logs output via logprise don't show up in caplog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using caplog in pytest doesn't trigger anything

2 participants