[PATCH] base/commands: Log what went wrong when cmd worker failed to launch

robin.sonefors at op5.com robin.sonefors at op5.com
Fri Nov 23 15:09:27 CET 2012


From: Robin Sonefors <robin.sonefors at op5.com>

The functionality to do so is right there, and the value of this
information is relatively high, so please print it.

Signed-off-by: Robin Sonefors <robin.sonefors at op5.com>
---
 base/commands.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/base/commands.c b/base/commands.c
index b7b8ff4..7140283 100644
--- a/base/commands.c
+++ b/base/commands.c
@@ -252,8 +252,8 @@ int launch_command_file_worker(void) {
 		command_wproc->sd = sv[0];
 		ret = iobroker_register(nagios_iobs, command_wproc->sd, command_wproc, command_input_handler);
 		if (ret < 0) {
-			logit(NSLOG_RUNTIME_ERROR, TRUE, "Failed to register command file worker socket %d with io broker %p\n",
-				  command_wproc->sd, nagios_iobs);
+			logit(NSLOG_RUNTIME_ERROR, TRUE, "Failed to register command file worker socket %d with io broker %p: %s\n",
+				  command_wproc->sd, nagios_iobs, iobroker_strerror(ret));
 			goto err_ioc;
 		}
 		logit(NSLOG_INFO_MESSAGE, TRUE, "Successfully launched command file worker with pid %d\n",
-- 
1.7.11.7


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov




More information about the Developers mailing list