icu4x
icu4x copied to clipboard
Fixes initialization of SimpleLogger in icu_datagen
The correct initialization order is
SimpleLogger::new()
.with_level(log::LevelFilter::Info)
.env()
Not
SimpleLogger::new()
.env()
.with_level(log::LevelFilter::Info)
Both SimpleLogger::env and SimpleLogger::with_level both override SimpleLogger::default_level. SimpleLogger::env should be called after SimpleLogger::with_level, so that RUST_LOG can override the default level set by SimpleLogger::with_level, if present. See: https://github.com/borntyping/rust-simple_logger/blob/fb96a82c274f92eff417904e6e819f25f3b51ccc/src/lib.rs#L153-L158
Without this change, setting RUST_LOG does not affect the log level used by icu-datagen.
Rebased and signed CLA. Should be good to merge.