Skip to content

DOC: Explain pypdf logging customization#3836

Open
ikejourney wants to merge 1 commit into
py-pdf:mainfrom
ikejourney:docs/logging-customization
Open

DOC: Explain pypdf logging customization#3836
ikejourney wants to merge 1 commit into
py-pdf:mainfrom
ikejourney:docs/logging-customization

Conversation

@ikejourney

Copy link
Copy Markdown

Summary

  • document how to customize pypdf log messages with Python's standard logging module
  • show examples for handlers, propagation, and module-specific loggers
  • clarify that configuring logging is preferred over patching internal helpers such as logger_warning

Closes #2020.

Checks

  • ran logging snippets manually
  • ran git diff --check

@stefan6419846 stefan6419846 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR.

In the issue, there were discussions about how to decrease the log level of messages using a context manager. Could we please have this in the docs as well? (Example: For my application, I want logger_warning from processing a PDF file logged at info level only.)

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.

DOC: How to handle / customize log records emitted by pypdf

3 participants