Skip to content

Commit

Permalink
Remove use of internal log macros
Browse files Browse the repository at this point in the history
These macros where removed in rust-lang/log#570.
Since 0.4.20, they have been replaced by the ones from the standard library.
We can also use the ones from the standard library.
  • Loading branch information
sosthene-nitrokey committed Aug 17, 2023
1 parent 6e50779 commit 4295a88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ macro_rules! try_log {
let lvl = $lvl;
if lvl <= $crate::log::STATIC_MAX_LEVEL && lvl <= $crate::log::max_level() {
$crate::__private_api_try_log(
$crate::log::__log_format_args!($($arg)+),
::core::format_args!($($arg)+),
lvl,
&($target, $crate::log::__log_module_path!(), $crate::log::__log_file!(), $crate::log::__log_line!()),
&($target, ::core::module_path!(), ::core::file!(), ::core::line!()),
)
} else {
Ok(())
}
});

($lvl:expr, $($arg:tt)+) => ($crate::try_log!(target: $crate::log::__log_module_path!(), $lvl, $($arg)+))
($lvl:expr, $($arg:tt)+) => ($crate::try_log!(target: ::core::module_path!(), $lvl, $($arg)+))
}

#[macro_export]
Expand Down

0 comments on commit 4295a88

Please sign in to comment.