From 42764c4e3e0d932d8567233b7b5466e1d7921a29 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 2 Dec 2022 19:04:22 -0800 Subject: [PATCH] init: Make an error message more informative Make it easier to diagnose service failures. Bug: 213617178 Change-Id: I27135cb32b6a98b2fe24ab2324dffbf5b591fdd5 Signed-off-by: Bart Van Assche --- init/service.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/service.cpp b/init/service.cpp index 8db2b05a3..2ce81a0ad 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -290,7 +290,8 @@ void Service::Reap(const siginfo_t& siginfo) { } if ((siginfo.si_code != CLD_EXITED || siginfo.si_status != 0) && on_failure_reboot_target_) { - LOG(ERROR) << "Service with 'reboot_on_failure' option failed, shutting down system."; + LOG(ERROR) << "Service " << name_ + << " has 'reboot_on_failure' option and failed, shutting down system."; trigger_shutdown(*on_failure_reboot_target_); }