From: Dagobert Michelsen Date: Thu, 28 May 2015 10:54:11 +0000 (+0200) Subject: Prefix all warnings and error messages with plugin name X-Git-Tag: collectd-5.6.0~709^2~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=47761781efc410c30c2735cb10713b833e2a5148;p=collectd.git Prefix all warnings and error messages with plugin name --- diff --git a/src/zone.c b/src/zone.c index 185a57e9..1781775f 100644 --- a/src/zone.c +++ b/src/zone.c @@ -100,16 +100,16 @@ zone_find_stats(c_avl_tree_t *tree, zoneid_t zoneid) if (c_avl_get(tree, (void **)&zoneid, (void **)&ret)) { if (!(ret = malloc(sizeof(zone_stats_t)))) { - WARNING("no memory"); + WARNING("zone plugin: no memory"); return(NULL); } if (!(key = malloc(sizeof(zoneid_t)))) { - WARNING("no memory"); + WARNING("zone plugin: no memory"); return(NULL); } *key = zoneid; if (c_avl_insert(tree, key, ret)) { - WARNING("error inserting into tree"); + WARNING("zone plugin: error inserting into tree"); return(NULL); } } @@ -145,7 +145,7 @@ zone_scandir(DIR *procdir) /* size_t physmem = sysconf(_SC_PHYS_PAGES) * pagesize;*/ if (!(tree=c_avl_create((void *) zone_compare))) { - WARNING("Failed to create tree"); + WARNING("zone plugin: Failed to create tree"); return(NULL); } @@ -174,7 +174,7 @@ static int zone_read (void) pagesize = sysconf(_SC_PAGESIZE); if ((procdir = opendir("/proc")) == NULL) { - ERROR("cannot open /proc directory\n"); + ERROR("zone plugin: cannot open /proc directory\n"); exit(1); }