Skip to content

Commit 6b4c391

Browse files
authored
fix(log): timezone_strategy overwriting LogLevels (tauri-apps#2401)
1 parent d5d9f7c commit 6b4c391

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"log": patch
3+
"log-js": patch
4+
---
5+
6+
Fix timezone_strategy overwriting previously set LogLevels.

plugins/log/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl Builder {
278278
let format =
279279
time::format_description::parse("[[[year]-[month]-[day]][[[hour]:[minute]:[second]]")
280280
.unwrap();
281-
self.dispatch = fern::Dispatch::new().format(move |out, message, record| {
281+
self.dispatch = self.dispatch.format(move |out, message, record| {
282282
out.finish(format_args!(
283283
"{}[{}][{}] {}",
284284
timezone_strategy.get_now().format(&format).unwrap(),

0 commit comments

Comments
 (0)