[collectd] [PATCH] sensors 01: syslog() and DBG() calls unification

Lubos Stanek kolektor<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>atlas.cz
Mon Dec 11 23:33:55 CET 2006


Signed-off-by: Stanek Lubos <kolektor<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>atlas.cz>
---
 src/sensors.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/sensors.c b/src/sensors.c
index ff8b580..93f93fc 100644
--- a/src/sensors.c
+++ b/src/sensors.c
@@ -199,7 +199,7 @@ static int sensors_config (char *key, ch
 	{
 		if (ignorelist_add (sensor_list, value))
 		{
-			syslog (LOG_EMERG, "Cannot add value to ignorelist.");
+			syslog (LOG_EMERG, MODULE_NAME": Cannot add value to ignorelist.");
 			return (1);
 		}
 	}
@@ -260,7 +260,7 @@ #endif
 	if (sensors_init (fh))
 	{
 		fclose (fh);
-		syslog (LOG_ERR, "sensors: Cannot initialize sensors. "
+		syslog (LOG_ERR, MODULE_NAME": Cannot initialize sensors. "
 				"Data will not be collected.");
 		return;
 	}
@@ -299,9 +299,8 @@ #endif
 
 				if ((new_feature = (featurelist_t *) malloc (sizeof (featurelist_t))) == NULL)
 				{
-					DBG ("sensors plugin: malloc: %s",
-							strerror (errno));
-					syslog (LOG_ERR, "sensors plugin: malloc: %s",
+					DBG ("malloc: %s", strerror (errno));
+					syslog (LOG_ERR, MODULE_NAME":  malloc: %s",
 							strerror (errno));
 					break;
 				}
-- 
1.4.2.4




More information about the collectd mailing list