Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map method name in capture_logs as well #628

Merged
merged 8 commits into from
Jul 13, 2024

Conversation

mounirmesselmeni
Copy link
Contributor

Summary

The fix of mapping exception to error log level doesn't work in capture_log during test

See #584 (comment)

Copy link

@gsinghsfdc gsinghsfdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@hynek hynek merged commit e28bbfe into hynek:main Jul 13, 2024
16 checks passed
@hynek
Copy link
Owner

hynek commented Jul 13, 2024

Thanks!

@mounirmesselmeni mounirmesselmeni deleted the fix_capture_logs branch July 13, 2024 15:47
@gsinghsfdc
Copy link

Thanks!

@hynek could you please cut a new minor release with this fix? been waiting for this fix to get my CI to pass 😄

iaindillingham added a commit to opensafely-core/job-server that referenced this pull request Jul 23, 2024
The `log_output` fixture (`tests/conftest.py`) returns an instance of
`structlog.testing.LogCapture`. structlog v24.3.0 changed the behaviour
of `LogCapture`, via the `map_method_name` function, to map the
`exception` log level to the `error` log level (hynek/structlog#628).
This change broke `test_post_error`. Here, we simply accept that
decision, and update `test_post_error`.
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.

3 participants