Closed cdhowie closed 7 months ago
Hmm, did you end up getting to the bottom of this @cdhowie? There may be some invocation of deserializer calls that we're not handling in our serde
impls, but as far as I can tell we should be case-insensitive and do have some test coverage for it.
@KodrAus After investigating several logging libraries we decided to use slog, so I haven't been back to this issue yet. At the time, I worked around it using a custom deserializer function with #[serde(deserialize_with = ...)]
.
I may have some spare cycles this weekend to dig into the issue further.
We use eq_ignore_ascii_case
in our FromStr
implementation (which the Deserialize
uses`), so I can't really find the issue.
Closing due to lack of activity, @cdhowie if you find the cause please reopen.
When deserializing from a
config::Config
,log::LevelFilter
deserialization is case-sensitive, even though it appears it should not be.Cargo.toml:
main.rs:
No output is expected.
Actual output:
The only casing that appears to be accepted is all uppercase -- using
"DEBUG"
works.log::Level
suffers from the same problem, and I'd expect the fix to be similar.