Skip to content

Commit eb274ca

Browse files
committed
Fix build with log v0.4.20
Fixes #87
1 parent 26e39e8 commit eb274ca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/log_macros.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ macro_rules! log {
5151
log::log!(target: $target, lvl, $($arg)+);
5252
}
5353
});
54-
($lvl:expr, $($arg:tt)+) => (log!(target: log::__log_module_path!(), $lvl, $($arg)+))
54+
($lvl:expr, $($arg:tt)+) => ({
55+
let lvl = $lvl;
56+
if lvl <= $crate::log_macros::MAX_LOG_LEVEL {
57+
log::log!(lvl, $($arg)+);
58+
}
59+
})
5560
}
5661

5762
#[macro_export]

0 commit comments

Comments
 (0)