1 macro_rules! log_internal {
2 ($self: ident, $lvl:expr, $($arg:tt)+) => (
3 &$self.logger.log(&Record::new($lvl, format_args!($($arg)+), module_path!(), file!(), line!()));
7 macro_rules! log_error {
8 ($self: ident, $($arg:tt)*) => (
9 #[cfg(not(any(feature = "max_level_off")))]
10 log_internal!($self, $crate::util::logger::Level::Error, $($arg)*);
14 macro_rules! log_warn {
15 ($self: ident, $($arg:tt)*) => (
16 #[cfg(not(any(feature = "max_level_off", feature = "max_level_error")))]
17 log_internal!($self, $crate::util::logger::Level::Warn, $($arg)*);
21 macro_rules! log_info {
22 ($self: ident, $($arg:tt)*) => (
23 #[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn")))]
24 log_internal!($self, $crate::util::logger::Level::Info, $($arg)*);
28 macro_rules! log_debug {
29 ($self: ident, $($arg:tt)*) => (
30 #[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info")))]
31 log_internal!($self, $crate::util::logger::Level::Debug, $($arg)*);
35 macro_rules! log_trace {
36 ($self: ident, $($arg:tt)*) => (
37 #[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info", feature = "max_level_debug")))]
38 log_internal!($self, $crate::util::logger::Level::Trace, $($arg)*);