py-pdf/pypdf
DOC: How to handle / customize log records emitted by pypdf
Ouverte
#2 020 ouverte le 26 juil. 2023
Easyhelp wantednf-documentation
Métriques du dépôt
- Stars
- (6 413 étoiles)
- Métriques de merge PR
- (Merge moyen 8j) (49 PRs mergées en 30 j)
Description
Explanation
According to https://github.com/py-pdf/pypdf/blob/11ee6480a3f795d770da89944f32a977e3c110e2/pypdf/_utils.py#L433-L449
logger_warning is advertised to allow overwriting, but doing so proves to be more complicated than expected.
There basically are two reasons for this:
- The implementation is located at
pypdf._utils.logger_warning, which usually marks an internal implementation and thus I would not assume this to be future-proof. - The method usually is imported directly, as can be seen in https://github.com/py-pdf/pypdf/blob/11ee6480a3f795d770da89944f32a977e3c110e2/pypdf/filters.py#L46 for example. This requires patching each import separately.