[collectd] [PATCH] plugin.c: Print lt_dlopen() to STDERR as well.

Sebastian Harl sh at tokkee.org
Wed Sep 12 10:55:35 CEST 2007


This makes sure the user will get the message on the terminal in any case.

Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
 src/plugin.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/plugin.c b/src/plugin.c
index 007d094..23ea901 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -133,6 +133,7 @@ static int plugin_load_file (char *file)
 		const char *error = lt_dlerror ();
 
 		ERROR ("lt_dlopen failed: %s", error);
+		fprintf (stderr, "lt_dlopen failed: %s\n", error);
 		return (1);
 	}
 
@@ -355,6 +356,10 @@ int plugin_load (const char *type)
 			ret = 0;
 			break;
 		}
+		else
+		{
+			fprintf (stderr, "Unable to load plugin %s.\n", type);
+		}
 	}
 
 	closedir (dh);
-- 
1.5.2.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070912/7dd69543/attachment.pgp 


More information about the collectd mailing list