Skip to content

Ability to print MuPDF errors to logging instead of stdout #3914

Closed
@jamesbraza

Description

@jamesbraza

Is your feature request related to a problem? Please describe.

PyMuPDF==1.24.10 will occasionally print MuPDF errors to stdout.

The issue with print is:

  • Random stdout prints mess with CLI utilities like rich.Progress bars
  • Misses the opportunity for the benefits of Python logging (process global message formatting and/or filtering)

Describe the solution you'd like

Either:

  • PyMuPDF to expose a way for callers to "install" a logging.Logger instead of print
    • And message to support a "level" argument (e.g. error level, debug level, etc)
  • PyMuPDF to move to Python logging

Describe alternatives you've considered

None

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions