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
42
43
44
45
46
47
48
49
50
51
52
//! This module contains manually expanded macros that should be defined by `define_debug_macros`.
//! See [Clippy ICE workaround] in [crate::debug::logging].

/// Special logging macro that prints to the Web Console on wasm targets and stdout
/// otherwise. It is supposed to be used only for development purposes and shouldn't be
/// present in a production-ready code.
/// Macro follows `iformat` formatting convention.
#[macro_export] macro_rules! TRACE {
    ($($arg:tt)*) => {
        $crate::debug::logging::trace($crate::iformat!($($arg)*))
    }
}

/// Special logging macro that prints to the Web Console on wasm targets and stdout
/// otherwise. It is supposed to be used only for development purposes and shouldn't be
/// present in a production-ready code.
/// Macro follows `iformat` formatting convention.
#[macro_export] macro_rules! DEBUG {
    ($($arg:tt)*) => {
        $crate::debug::logging::debug($crate::iformat!($($arg)*))
    }
}

/// Special logging macro that prints to the Web Console on wasm targets and stdout
/// otherwise. It is supposed to be used only for development purposes and shouldn't be
/// present in a production-ready code.
/// Macro follows `iformat` formatting convention.
#[macro_export] macro_rules! INFO {
    ($($arg:tt)*) => {
        $crate::debug::logging::info($crate::iformat!($($arg)*))
    }
}

/// Special logging macro that prints to the Web Console on wasm targets and stdout
/// otherwise. It is supposed to be used only for development purposes and shouldn't be
/// present in a production-ready code.
/// Macro follows `iformat` formatting convention.
#[macro_export] macro_rules! WARNING {
    ($($arg:tt)*) => {
        $crate::debug::logging::warn($crate::iformat!($($arg)*))
    }
}

/// Special logging macro that prints to the Web Console on wasm targets and stdout
/// otherwise. It is supposed to be used only for development purposes and shouldn't be
/// present in a production-ready code.
/// Macro follows `iformat` formatting convention.
#[macro_export] macro_rules! ERROR {
    ($($arg:tt)*) => {
        $crate::debug::logging::error($crate::iformat!($($arg)*))
    }
}