Skip to content

Commit 243c874

Browse files
authored
Merge pull request #589 from andrei-21/feature/set-log-target
Set log target to module path
2 parents 01c396a + 1199f7d commit 243c874

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/logger.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ impl LogWriter for Writer {
153153
#[cfg(not(feature = "uniffi"))]
154154
log::logger().log(
155155
&builder
156+
.target(record.module_path)
156157
.module_path(Some(record.module_path))
157158
.line(Some(record.line))
158159
.args(format_args!("{}", record.args))
@@ -161,6 +162,7 @@ impl LogWriter for Writer {
161162
#[cfg(feature = "uniffi")]
162163
log::logger().log(
163164
&builder
165+
.target(&record.module_path)
164166
.module_path(Some(&record.module_path))
165167
.line(Some(record.line))
166168
.args(format_args!("{}", record.args))

0 commit comments

Comments
 (0)