X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=e1f204b9824ce05ca44a6a1861324bfcfe08747c;hb=488c2ca9e3f6f6082f192bdd5d737c6cd1298ba2;hp=7015c875f0fd9c664b99e6c19a54e9ff397f85fa;hpb=3b9261df9f7426c4b823a801671aaaba30fda6d9;p=collectd.git diff --git a/src/common.c b/src/common.c index 7015c875..e1f204b9 100644 --- a/src/common.c +++ b/src/common.c @@ -980,12 +980,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 */