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

Handle pandoc logging returning two unknown log levels #272

Merged
merged 5 commits into from
May 5, 2022

Conversation

H0R5E
Copy link
Contributor

@H0R5E H0R5E commented May 5, 2022

This is a follow up to #271, which deals with the case where pandoc produces more than one logging message with non-standard levels, followed by another log message. For example, the following pandoc output still produced a KeyError:

[WARN] This is some message on
two lines
[ERR] This is a second message.
[ERROR] This is a third message.

This PR updates the _classify_pandoc_logging function and the test_classify_pandoc_logging_invalid_level test to correctly handle this case.

I have also updated the level_map dictionary which converts the pandoc levels to python codes, so that it only contains levels formally used by pandoc.

Fixes #269

@JessicaTegner
Copy link
Owner

Fantastic work.

@JessicaTegner JessicaTegner merged commit b5868e4 into JessicaTegner:master May 5, 2022
@H0R5E H0R5E deleted the strip_all_log_levels branch June 29, 2022 09:26
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.

KeyError in _classify_pandoc_logging when the message format does not fit the assumptions
2 participants