X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=d2a1b362429c4ffb5bf049437183b6b5ea328e48;hb=7e6f12dfba76b295d40e835d310d69d625ede88e;hp=c3e502ad97f96d478e9890638c9f59ae25489740;hpb=4e613c118e301a1a6a70336cd7b65bf18b4bc7b0;p=collectd.git diff --git a/src/common.c b/src/common.c index c3e502ad..d2a1b362 100644 --- a/src/common.c +++ b/src/common.c @@ -876,12 +876,15 @@ int parse_value (const char *value, value_t *ret_value, int ds_type) } if (value == endptr) { - ERROR ("parse_value: Failed to parse string as number: %s.", value); + ERROR ("parse_value: Failed to parse string as %s: %s.", + DS_TYPE_TO_STRING (ds_type), value); return -1; } else if ((NULL != endptr) && ('\0' != *endptr)) - WARNING ("parse_value: Ignoring trailing garbage after number: %s.", - endptr); + INFO ("parse_value: Ignoring trailing garbage \"%s\" after %s value. " + "Input string was \"%s\".", + endptr, DS_TYPE_TO_STRING (ds_type), value); + return 0; } /* int parse_value */