wasm_tracing/config/console.rs
1/// Determines how the web console should behave
2#[derive(Debug, PartialEq, Eq, Clone, Copy)]
3pub enum ConsoleConfig {
4 /// Do not record to console
5 NoReporting,
6 /// Record to console without colorful text
7 ReportWithoutConsoleColor,
8 /// Record to console with colorful text
9 ReportWithConsoleColor,
10}
11
12impl ConsoleConfig {
13 /// True if the console reporting spans
14 pub fn reporting_enabled(&self) -> bool {
15 !matches!(self, ConsoleConfig::NoReporting)
16 }
17}