MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / log_panics

Function log_panics

atomic-cli/src/logging/mod.rs:358–364  ·  view source on GitHub ↗

Log panics to the file; the previous hook still prints them.

()

Source from the content-addressed store, hash-verified

356
357/// Log panics to the file; the previous hook still prints them.
358fn log_panics() {
359 let previous = std::panic::take_hook();
360 std::panic::set_hook(Box::new(move |info| {
361 tracing::error!(target: PANIC_TARGET, "{info}");
362 previous(info);
363 }));
364}
365
366#[cfg(test)]
367mod tests {

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected