wasm-tracing 2.1.0

Tracing subscriber for WebAssembly. Maintained fork of tracing-wasm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Determines how the web console should behave
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum ConsoleConfig {
    /// Do not record to console
    NoReporting,
    /// Record to console without colorful text
    ReportWithoutConsoleColor,
    /// Record to console with colorful text
    ReportWithConsoleColor,
}

impl ConsoleConfig {
    /// True if the console reporting spans
    pub fn reporting_enabled(&self) -> bool {
        !matches!(self, ConsoleConfig::NoReporting)
    }
}