X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Fmacro_logger.rs;h=bea3685b546728024bf1da7695dc9f495dcf23ff;hb=HEAD;hp=607f8fe4e581bdeb8ef7c0cdf26a8fb139045c20;hpb=0029f04fce6beba29e60b2c227d51bcf1ba15545;p=rust-lightning diff --git a/src/util/macro_logger.rs b/src/util/macro_logger.rs deleted file mode 100644 index 607f8fe4..00000000 --- a/src/util/macro_logger.rs +++ /dev/null @@ -1,42 +0,0 @@ -use util::logger::Record; - -macro_rules! log_internal { - ($self: ident, $lvl:expr, $($arg:tt)+) => ( - &$self.logger.log(&Record::new($lvl, format_args!($($arg)+), module_path!(), file!(), line!())); - ); -} - -macro_rules! log_error { - ($self: ident, $($arg:tt)*) => ( - #[cfg(not(any(feature = "max_level_off")))] - log_internal!($self, $crate::util::logger::Level::Error, $($arg)*); - ) -} - -macro_rules! log_warn { - ($self: ident, $($arg:tt)*) => ( - #[cfg(not(any(feature = "max_level_off", feature = "max_level_error")))] - log_internal!($self, $crate::util::logger::Level::Warn, $($arg)*); - ) -} - -macro_rules! log_info { - ($self: ident, $($arg:tt)*) => ( - #[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn")))] - log_internal!($self, $crate::util::logger::Level::Info, $($arg)*); - ) -} - -macro_rules! log_debug { - ($self: ident, $($arg:tt)*) => ( - #[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info")))] - log_internal!($self, $crate::util::logger::Level::Debug, $($arg)*); - ) -} - -macro_rules! log_trace { - ($self: ident, $($arg:tt)*) => ( - #[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info", feature = "max_level_debug")))] - log_internal!($self, $crate::util::logger::Level::Trace, $($arg)*); - ) -}