Skip to content

Commit 5939e57

Browse files
raccognicholasbishop
authored andcommitted
uefi-services: Change panic handler log message.
The panic handler now displays its log message using `println!` instead of `error!`. The message prefix is altered from [ERROR] to [PANIC]. The extraneous filename and line number printed by `error!` are also removed from the log message.
1 parent 5aa11af commit 5939e57

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@
9090

9191
- The `no_panic_handler` feature has been replaced with an additive
9292
`panic_handler` feature. The new feature is enabled by default.
93+
- Changed the panic handler log message to use `println!` instead of
94+
`error!`. This removes an extraneous file name and line number from
95+
the log message.
9396

9497
## uefi - 0.16.1
9598

uefi-services/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ unsafe extern "efiapi" fn exit_boot_services(_e: Event, _ctx: Option<NonNull<c_v
181181
#[cfg(feature = "panic_handler")]
182182
#[panic_handler]
183183
fn panic_handler(info: &core::panic::PanicInfo) -> ! {
184-
error!("{}", info);
184+
println!("[PANIC]: {}", info);
185185

186186
// Give the user some time to read the message
187187
if let Some(st) = unsafe { SYSTEM_TABLE.as_ref() } {

0 commit comments

Comments
 (0)