Skip to content

add proper thread safe logging mechanism #14

@ashutoshvarma

Description

@ashutoshvarma

As of now xpdf errors/warnings/logs are sent to stdout and only way to partially control it is with Config.error_quiet. Also pyxpdf in most cases cannot detect errors in xpdf sources as there is no error callback or logging mechanism implemented.

Ideas:-
libxpdf has an error callback which can be utilized for log/error reporting.

# https://github.com/ashutoshvarma/libxpdf/blob/bc061b4e3da53b08a74e81706c6d8721af6b6094/xpdf-4.02/xpdf/Error.h#L39
extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category,

Also take a look at lxml's logging mechanism, their use case is also similar to us
https://github.com/lxml/lxml/blob/master/src/lxml/xmlerror.pxi

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions