Skip to content

Improve python structured logging sample#305

Merged
reggeenr merged 1 commit intomainfrom
improve-python-structured-logging
Mar 11, 2026
Merged

Improve python structured logging sample#305
reggeenr merged 1 commit intomainfrom
improve-python-structured-logging

Conversation

@nbaudis
Copy link
Member

@nbaudis nbaudis commented Mar 11, 2026

This contains several improvements for the Python structured logging sample:

  • Add logger.catch() context for guarding the main function against uncaught errors
  • Set up custom loguru sink only in __main__ module context
  • Fix code style: remove semicolons, organize imports, fix blank lines

@nbaudis nbaudis requested a review from reggeenr March 11, 2026 16:53
Copy link
Collaborator

@reggeenr reggeenr left a comment

Choose a reason for hiding this comment

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

LGTM! Great stuff! Really appreciate your initiative, @nbaudis!

@reggeenr reggeenr merged commit a814e77 into main Mar 11, 2026
2 checks passed
@reggeenr reggeenr deleted the improve-python-structured-logging branch March 11, 2026 16:59
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.

2 participants