slog icon indicating copy to clipboard operation
slog copied to clipboard

Unconsistent slog::Level conversion to string on Warning variation

Open Jonathas-Conceicao opened this issue 3 years ago • 1 comments

slog::Level::Warning.as_str() results in the same WARN as slog::Level::Warning.as_short_str() instead of the WARNING one might expect. Is this intentional in anyway?

The related source: https://github.com/slog-rs/slog/blob/f9e30f0dd9bad610227d9374001fcc13d5b7c8c8/src/lib.rs#L2076-L2086

Where variants like Critical are CRITICAL and CRIT on the str representation.

Jonathas-Conceicao avatar Mar 11 '21 21:03 Jonathas-Conceicao

Probably not. Weird that no one ever raised it.

dpc avatar Mar 11 '21 22:03 dpc

Interestingly enough, log also uses WARN: https://docs.rs/log/0.4.20/src/log/lib.rs.html#414.

pravic avatar Feb 23 '24 09:02 pravic