mirror of
https://github.com/rust-lang/log.git
synced 2025-09-28 05:20:27 +00:00
Deprecate log_panics
This commit is contained in:
parent
41c570079c
commit
ea842c5c81
@ -778,12 +778,9 @@ impl error::Error for ShutdownLoggerError {
|
||||
fn description(&self) -> &str { "shutdown_logger() called without an active logger" }
|
||||
}
|
||||
|
||||
/// Registers a panic hook which logs at the error level.
|
||||
/// Deprecated
|
||||
///
|
||||
/// 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.
|
||||
/// Use https://crates.io/crates/log-panics instead.
|
||||
#[cfg(all(feature = "nightly", feature = "use_std"))]
|
||||
pub fn log_panics() {
|
||||
std::panic::set_hook(Box::new(panic::log));
|
||||
|
Loading…
x
Reference in New Issue
Block a user