20 lines
838 B
Diff
20 lines
838 B
Diff
commit 08aa250dc73d6e36ebd7db9ebedb09ea36b377a0
|
|
Author: Michael Wigard <michael.wigard@uni-muenster.de>
|
|
Date: Wed May 24 13:10:31 2023 +0200
|
|
|
|
attributes: fix instrument with "log" feature
|
|
|
|
diff --git a/tracing-attributes/src/expand.rs b/tracing-attributes/src/expand.rs
|
|
index d71366c6..59a2eed4 100644
|
|
--- a/tracing-attributes/src/expand.rs
|
|
+++ b/tracing-attributes/src/expand.rs
|
|
@@ -340,7 +340,7 @@ fn gen_block<B: ToTokens>(
|
|
// regression in case the level is enabled.
|
|
let __tracing_attr_span;
|
|
let __tracing_attr_guard;
|
|
- if tracing::level_enabled!(#level) {
|
|
+ if tracing::level_enabled!(#level) || tracing::if_log_enabled!(#level, {true} else {false}) {
|
|
__tracing_attr_span = #span;
|
|
#follows_from
|
|
__tracing_attr_guard = __tracing_attr_span.enter();
|