src/configfile.c: Improve a debugging message.
[collectd.git] / src / configfile.c
index bb1770d..0e28e92 100644 (file)
@@ -172,7 +172,7 @@ static int cf_dispatch (const char *type, const char *orig_key,
        free (key);
        free (value);
 
-       DEBUG ("return (%i)", ret);
+       DEBUG ("cf_dispatch: return (%i)", ret);
 
        return (ret);
 } /* int cf_dispatch */
@@ -208,13 +208,18 @@ static int dispatch_value_typesdb (const oconfig_item_t *ci)
 
        cf_default_typesdb = 0;
 
-       if (ci->values_num < 1)
+       if (ci->values_num < 1) {
+               ERROR ("configfile: `TypesDB' needs at least one argument.");
                return (-1);
+       }
 
        for (i = 0; i < ci->values_num; ++i)
        {
-               if (OCONFIG_TYPE_STRING != ci->values[i].type)
+               if (OCONFIG_TYPE_STRING != ci->values[i].type) {
+                       WARNING ("configfile: TypesDB: Skipping %i. argument which "
+                                       "is not a string.", i + 1);
                        continue;
+               }
 
                read_types_list (ci->values[i].value.string);
        }