diff --git a/substrate/primitives/sr-io/src/lib.rs b/substrate/primitives/sr-io/src/lib.rs index 2b40670c450cb02cb1a79e7346cca65ae35ef715..4ceabb4511af1c8f754fe09385b55e19ed7b8f04 100644 --- a/substrate/primitives/sr-io/src/lib.rs +++ b/substrate/primitives/sr-io/src/lib.rs @@ -743,7 +743,7 @@ mod allocator_impl { pub fn panic(info: &core::panic::PanicInfo) -> ! { unsafe { let message = rstd::alloc::format!("{}", info); - misc::print_utf8(message.as_bytes()); + logging::log(LogLevel::Error, "runtime", message.as_bytes()); core::intrinsics::abort() } } @@ -751,10 +751,8 @@ pub fn panic(info: &core::panic::PanicInfo) -> ! { #[cfg(all(not(feature = "disable_oom"), not(feature = "std")))] #[alloc_error_handler] pub extern fn oom(_: core::alloc::Layout) -> ! { - static OOM_MSG: &str = "Runtime memory exhausted. Aborting"; - unsafe { - misc::print_utf8(OOM_MSG.as_bytes()); + logging::log(LogLevel::Error, "runtime", b"Runtime memory exhausted. Aborting"); core::intrinsics::abort(); } }