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

This commit is contained in:
Seishiin
2025-02-08 02:41:34 +01:00
committed by GitHub
parent d5d9f7c970
commit 6b4c391738
2 changed files with 7 additions and 1 deletions
@@ -0,0 +1,6 @@
---
"log": patch
"log-js": patch
---
Fix timezone_strategy overwriting previously set LogLevels.
+1 -1
View File
@@ -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(),