Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proper thread safe logging mechanism #14

Open
ashutoshvarma opened this issue Aug 23, 2020 · 0 comments
Open

add proper thread safe logging mechanism #14

ashutoshvarma opened this issue Aug 23, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ashutoshvarma
Copy link
Owner

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

@ashutoshvarma ashutoshvarma added enhancement New feature or request help wanted Extra attention is needed labels Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant