MCPcopy Create free account
hub / github.com/PowerShell/DSC / enable_tracing

Function enable_tracing

resources/registry/src/main.rs:145–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143}
144
145pub fn enable_tracing() {
146 // default filter to trace level
147 let filter = EnvFilter::builder().with_default_directive(LevelFilter::TRACE.into()).parse("").unwrap_or_default();
148 let layer = tracing_subscriber::fmt::Layer::default().with_writer(std::io::stderr);
149 let fmt = layer
150 .with_ansi(false)
151 .with_level(true)
152 .with_line_number(true)
153 .json()
154 .boxed();
155
156 let subscriber = tracing_subscriber::Registry::default().with(fmt).with(filter);
157
158 if tracing::subscriber::set_global_default(subscriber).is_err() {
159 eprintln!("{}", t!("main.tracingInitError"));
160 }
161}
162
163#[cfg(debug_assertions)]
164fn check_debug() {

Callers 1

mainFunction · 0.70

Calls 2

defaultFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected