Remove some dead Logger code
[rust-lightning] / src / util / macro_logger.rs
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!()));
4         );
5 }
6
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)*);
11         )
12 }
13
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)*);
18         )
19 }
20
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)*);
25         )
26 }
27
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)*);
32         )
33 }
34
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)*);
39         )
40 }