From 6a68fb49954d2d96ff102951a4433c2145a66859 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 26 Mar 2016 18:57:28 -0700 Subject: [PATCH] Update for upstream panic handler changes. --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index aca1253..58cfb54 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -774,15 +774,15 @@ impl error::Error for ShutdownLoggerError { fn description(&self) -> &str { "shutdown_logger_raw() called without an active logger" } } -/// Registers a panic handler which logs at the error level. +/// Registers a panic hook which logs at the error level. /// -/// The format is the same as the default panic handler. The reporting module is +/// The format is the same as the default panic hook . The reporting module is /// `log::panic`. /// /// Requires the `use_std` (enabled by default) and `nightly` features. #[cfg(all(feature = "nightly", feature = "use_std"))] pub fn log_panics() { - std::panic::set_handler(panic::log); + std::panic::set_hook(Box::new(panic::log)); } // inner module so that the reporting module is log::panic instead of log