fix(log): timezone_strategy overwriting LogLevels (#2401)

pull/2408/head
Seishiin 4 months ago committed by GitHub
parent d5d9f7c970
commit 6b4c391738
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,6 @@
---
"log": patch
"log-js": patch
---
Fix timezone_strategy overwriting previously set LogLevels.

@ -278,7 +278,7 @@ impl Builder {
let format =
time::format_description::parse("[[[year]-[month]-[day]][[[hour]:[minute]:[second]]")
.unwrap();
self.dispatch = fern::Dispatch::new().format(move |out, message, record| {
self.dispatch = self.dispatch.format(move |out, message, record| {
out.finish(format_args!(
"{}[{}][{}] {}",
timezone_strategy.get_now().format(&format).unwrap(),

Loading…
Cancel
Save