lzma_rs/
macros.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/// Log trace message (feature: enabled).
#[cfg(feature = "enable_logging")]
macro_rules! lzma_trace {
    ($($arg:tt)+) => {
        log::trace!($($arg)+);
    }
}

/// Log debug message (feature: enabled).
#[cfg(feature = "enable_logging")]
macro_rules! lzma_debug {
    ($($arg:tt)+) => {
        log::debug!($($arg)+);
    }
}

/// Log info message (feature: enabled).
#[cfg(feature = "enable_logging")]
macro_rules! lzma_info {
    ($($arg:tt)+) => {
        log::info!($($arg)+);
    }
}

/// Log trace message (feature: disabled).
#[cfg(not(feature = "enable_logging"))]
macro_rules! lzma_trace {
    ($($arg:tt)+) => {};
}

/// Log debug message (feature: disabled).
#[cfg(not(feature = "enable_logging"))]
macro_rules! lzma_debug {
    ($($arg:tt)+) => {};
}

/// Log info message (feature: disabled).
#[cfg(not(feature = "enable_logging"))]
macro_rules! lzma_info {
    ($($arg:tt)+) => {};
}