Skip to content
This repository was archived by the owner on Dec 7, 2024. It is now read-only.

Commit 89ca0be

Browse files
committed
fix: use_format didn't return self
1 parent 2238884 commit 89ca0be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ impl DioxusLogger {
4141
/// The available options are `{LEVEL}`, `{PATH}`, `{ARGS}` and `{TIMESTAMP}`
4242
///
4343
/// Providing the format of `[{LEVEL}] {PATH} - {ARGS}]` will return something like `[INFO] dioxus_testing - this is my log message`
44-
pub fn use_format(&mut self, format: &'static str) {
45-
self.format = format;
44+
pub fn use_format(self, format: &'static str) -> Self {
45+
Self {
46+
level_filter: self.level_filter,
47+
format
48+
}
4649
}
4750
}
4851

0 commit comments

Comments
 (0)