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

Level INF (uppercase) not parsed correctly #288

Closed
lauclld opened this issue Jun 4, 2024 · 4 comments · Fixed by #289 or #307
Closed

Level INF (uppercase) not parsed correctly #288

lauclld opened this issue Jun 4, 2024 · 4 comments · Fixed by #289 or #307

Comments

@lauclld
Copy link

lauclld commented Jun 4, 2024

Hello,

First, thanks for the great work!

While trying to tweak the config file, I realized that the info level does not parse INF correctly. Lowercase inf works fine. You can try with the attached files.

I'm on Windows with v0.29.5.

Thanks,
Laurent
example.log
example-hl-config.yaml.txt

@lauclld
Copy link
Author

lauclld commented Jun 4, 2024

Same with v0.29.6. Thanks.

@pamburus
Copy link
Owner

pamburus commented Jun 4, 2024

Hello,

Thanks for finding and posting the issue.

Very curious indeed, the YAML deserializer somehow deserializes this string in lower case.
I am investigating the problem, but in the meantime I can suggest a workaround - if you put it in single quotes, i.e. ['INF'], then it works.

@pamburus
Copy link
Owner

pamburus commented Jun 4, 2024

Created issue #568 for the config-rs crate.
This problem seems to be specific to the YAML format, because in most other formats, strings must be enclosed in quotes.

I am thinking about ignoring case for levels. This would not only work around the problem, but also make it easier to configure for different spellings.

@lauclld
Copy link
Author

lauclld commented Jun 5, 2024

Thanks for the quick fix and the workaround. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants