From eee13a4fab32c69078c1530a6f99d626bd1a6323 Mon Sep 17 00:00:00 2001 From: Nichamon Naksinehaboon Date: Tue, 8 Aug 2023 13:14:49 -0500 Subject: [PATCH] Make ldmsd_plugattr report log messages to the application's default log The patch is to fix build problems of stand-alone application in the project that uses the library. --- ldms/src/ldmsd/ldmsd_plugattr.c | 126 ++++++++++++++++---------------- ldms/src/ldmsd/ldmsd_plugattr.h | 29 ++++---- 2 files changed, 80 insertions(+), 75 deletions(-) diff --git a/ldms/src/ldmsd/ldmsd_plugattr.c b/ldms/src/ldmsd/ldmsd_plugattr.c index eae098a0d..d9346c3dc 100644 --- a/ldms/src/ldmsd/ldmsd_plugattr.c +++ b/ldms/src/ldmsd/ldmsd_plugattr.c @@ -54,8 +54,10 @@ #include #include "ovis_util/dstring.h" -/* Defined in ldmsd.c */ -extern ovis_log_t config_log; +/* + * This makes the log messages go to the application's default log. + */ +ovis_log_t app_log = NULL; #ifdef TEST_PLUGATTR #define ovis_log(l, e, f, ...) printf(f, ##__VA_ARGS__ ) @@ -192,7 +194,7 @@ static int canonical(char *buf, size_t len) while (nk < NUMKEYS) { \ char *k = va_arg(ap, char *); \ if (!k) { \ - ovis_log(config_log, OVIS_LERROR, \ + ovis_log(app_log, OVIS_LERROR, \ "ldmsd_plugattr: key list input contains NULL.\n"); \ RC = EINVAL; \ break; \ @@ -222,7 +224,7 @@ static int attr_deprecated(struct attr_value_list *avl, struct attr_value_list * if (!dep) return 0; if (!context) { - ovis_log(config_log, OVIS_LERROR, "%s %s: attr_deprecated miscalled.\n", + ovis_log(app_log, OVIS_LERROR, "%s %s: attr_deprecated miscalled.\n", al ? al : "", kl ? kl : ""); return 1; } @@ -245,19 +247,19 @@ static int attr_deprecated(struct attr_value_list *avl, struct attr_value_list * last_name = d->name; if (d->error != 0) { badcount++; - ovis_log(config_log, OVIS_LERROR, + ovis_log(app_log, OVIS_LERROR, "No longer supported '%s=%s' in %s at line with: %s %s\n", d->name, v, context, al, kl); if (d->msg) { - ovis_log(config_log, OVIS_LERROR, "%s\n", + ovis_log(app_log, OVIS_LERROR, "%s\n", d->msg); } } else { - ovis_log(config_log, OVIS_LWARNING, + ovis_log(app_log, OVIS_LWARNING, "deprecated '%s=%s' in %s at line with: %s %s\n", d->name, v, context, al, kl); if (d->msg) { - ovis_log(config_log, OVIS_LERROR, "%s\n", + ovis_log(app_log, OVIS_LERROR, "%s\n", d->msg); } } @@ -271,18 +273,18 @@ static int attr_deprecated(struct attr_value_list *avl, struct attr_value_list * last_name = d->name; if (d->error != 0) { badcount++; - ovis_log(config_log, OVIS_LERROR, + ovis_log(app_log, OVIS_LERROR, "No longer supported '%s' in %s at line with: %s %s\n", d->name, context, al, kl); if (d->msg) { - ovis_log(config_log, OVIS_LERROR, "%s\n", d->msg); + ovis_log(app_log, OVIS_LERROR, "%s\n", d->msg); } } else { - ovis_log(config_log, OVIS_LWARNING, + ovis_log(app_log, OVIS_LWARNING, "Deprecated '%s' in %s at line with: %s %s\n", d->name, context, al, kl); if (d->msg) { - ovis_log(config_log, OVIS_LERROR, "%s\n", d->msg); + ovis_log(app_log, OVIS_LERROR, "%s\n", d->msg); } } skip_kwl: ; @@ -298,7 +300,7 @@ static int attr_deprecated(struct attr_value_list *avl, struct attr_value_list * static int attr_blacklist(const char **bad, struct attr_value_list *l, const char *context, const char *prefix) { if (!bad || !l || !context || !prefix) { - ovis_log(config_log, OVIS_LERROR, "%s: attr_blacklist miscalled.\n", prefix); + ovis_log(app_log, OVIS_LERROR, "%s: attr_blacklist miscalled.\n", prefix); return 1; } int badcount = 0; @@ -309,10 +311,10 @@ static int attr_blacklist(const char **bad, struct attr_value_list *l, const cha badcount++; char *val = av_value(l, *p); if (val) - ovis_log(config_log, OVIS_LERROR, "bad '%s=%s' in %s at line with: %s\n", + ovis_log(app_log, OVIS_LERROR, "bad '%s=%s' in %s at line with: %s\n", *p, val, context, prefix); else - ovis_log(config_log, OVIS_LERROR, "bad '%s' in %s at line with: %s\n", + ovis_log(app_log, OVIS_LERROR, "bad '%s' in %s at line with: %s\n", *p, context, prefix); } p++; @@ -325,7 +327,7 @@ static int attr_blacklist(const char **bad, struct attr_value_list *l, const cha int ldmsd_plugattr_add(struct plugattr *pa, struct attr_value_list *avl, struct attr_value_list *kwl, const char **avban, const char **kwban, struct pa_deprecated *dep, unsigned numkeys, ...) { if (!pa || !numkeys || (!avl && !kwl)) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_add: bad call\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_add: bad call\n"); return EINVAL; } @@ -360,20 +362,20 @@ int ldmsd_plugattr_add(struct plugattr *pa, struct attr_value_list *avl, struct char *key = NULL; VGETKEY(avl, numkeys, key, rc); if (rc) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_add: key error\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_add: key error\n"); return rc; } struct list_pair *lp; lp = idx_find(pa->idx, (void *)key, strlen(key)); if (lp) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_add: key exist\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_add: key exist\n"); return EEXIST; } lp = list_pair_create(key, avl, kwl); if (!lp) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_add: lpc failed\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_add: lpc failed\n"); return ENOMEM; } rc = idx_add(pa->idx, lp->key, strlen(lp->key), lp); @@ -381,7 +383,7 @@ int ldmsd_plugattr_add(struct plugattr *pa, struct attr_value_list *avl, struct list_pair_destroy(lp, NULL); #if DBG_LPA else - ovis_log(config_log, OVIS_LDEBUG, "ldmsd_plugattr_add: %s succeeded\n", lp->key); + ovis_log(app_log, OVIS_LDEBUG, "ldmsd_plugattr_add: %s succeeded\n", lp->key); #endif return rc; @@ -391,7 +393,7 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ { int rc = 0; if (!plugin_name) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create: bad call\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create: bad call\n"); errno = EINVAL; return NULL; } @@ -426,13 +428,13 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ struct attr_value_list *ikvl = NULL; struct plugattr *pa = calloc(1, sizeof(*pa)); if (!pa) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create: oom pa\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create: oom pa\n"); errno = ENOMEM; return NULL; } pa->idx = idx_create(); if (!pa->idx) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create: oom idx\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create: oom idx\n"); errno = ENOMEM; goto err; } @@ -441,37 +443,37 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ pa->overrides.key = strdup(plugin_name); if ( !pa->overrides.key || (avl && !pa->overrides.avl) || (kwl && !pa->overrides.kvl) ) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create: oom overrides\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create: oom overrides\n"); errno = ENOMEM; goto err; } if (!filename) { - ovis_log(config_log, OVIS_LDEBUG, + ovis_log(app_log, OVIS_LDEBUG, "ldmsd_plugattr_create: called without conf file.\n"); return pa; } pa->fname = strdup(filename); if (!pa->fname) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create: oom fname\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create: oom fname\n"); errno = ENOMEM; goto err; } FILE *f = fopen(filename, "r"); if (!f) { rc = errno; - ovis_log(config_log, OVIS_LERROR, "Cannot open attrs file %s\n", filename); + ovis_log(app_log, OVIS_LERROR, "Cannot open attrs file %s\n", filename); goto fout; } rc = fseek(f, 0, SEEK_END); if (rc) { rc = errno; - ovis_log(config_log, OVIS_LERROR, "Cannot seek attrs file %s\n", filename); + ovis_log(app_log, OVIS_LERROR, "Cannot seek attrs file %s\n", filename); goto fout; } long len = ftell(f); if (!len) { - ovis_log(config_log, OVIS_LWARNING, "Empty attrs file %s\n", filename); + ovis_log(app_log, OVIS_LWARNING, "Empty attrs file %s\n", filename); goto fout; } @@ -482,14 +484,14 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ } pa->buf = malloc(len+1); if (!pa->buf) { - ovis_log(config_log, OVIS_LERROR, "Out of memory reading %s\n", filename); + ovis_log(app_log, OVIS_LERROR, "Out of memory reading %s\n", filename); rc = ENOMEM; goto fout; } pa->buf[len] = '\0'; size_t nb = fread(pa->buf, sizeof(char), len, f); if (nb != len) { - ovis_log(config_log, OVIS_LERROR, "Fail reading attrs file %s %zu %ld \n", + ovis_log(app_log, OVIS_LERROR, "Fail reading attrs file %s %zu %ld \n", filename, nb, len); rc = EINVAL; goto fout; @@ -523,13 +525,13 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ iavl = av_new(size); ikvl = av_new(size); if (!iavl || !ikvl) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create oom1\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create oom1\n"); rc = ENOMEM; goto fout; } rc = tokenize(linestart, ikvl, iavl); if (rc) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create tokenize failed\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create tokenize failed\n"); goto fout; } char *key = NULL; @@ -546,7 +548,7 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ } if (!key) { if (rc == EINVAL) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create misused.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create misused.\n"); goto fout; } int npos = av_idx_of(ikvl, plugin_name); @@ -554,7 +556,7 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ char *as, *ks; as = av_to_string(iavl, 0); ks = av_to_string(ikvl, 0); - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create: line with neither %s nor match of key found. line contains %s %s\n", + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create: line with neither %s nor match of key found. line contains %s %s\n", plugin_name, as, ks); free(as); free(ks); @@ -562,7 +564,7 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ } key = strdup(plugin_name); if (!key) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_create oom2\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_create oom2\n"); rc = ENOMEM; goto fout; } @@ -575,7 +577,7 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ if (rc) goto fout; } else { - ovis_log(config_log, OVIS_LDEBUG, "no token ban for kw\n"); + ovis_log(app_log, OVIS_LDEBUG, "no token ban for kw\n"); } if (avban) { char *as = av_to_string(iavl, 0); @@ -584,7 +586,7 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ if (rc) goto fout; } else { - ovis_log(config_log, OVIS_LDEBUG, "no token ban for attr\n"); + ovis_log(app_log, OVIS_LDEBUG, "no token ban for attr\n"); } struct list_pair *lp; @@ -593,13 +595,13 @@ struct plugattr *ldmsd_plugattr_create(const char *filename, const char *plugin_ av_free(ikvl); iavl = ikvl = NULL; if (!lp) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr: fail lpc\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr: fail lpc\n"); rc = ENOMEM; goto fout; } rc = idx_add(pa->idx, lp->key, strlen(lp->key), lp); if (rc == EEXIST) { - ovis_log(config_log, OVIS_LERROR, "Duplicate key %s in %s\n", + ovis_log(app_log, OVIS_LERROR, "Duplicate key %s in %s\n", lp->key, pa->fname); goto fout; } @@ -646,12 +648,12 @@ const char *ldmsd_plugattr_plugin(struct plugattr *pa) const char * ldmsd_plugattr_value(struct plugattr *pa, const char *attr, const char *key) { if (!pa || !attr ) { - ovis_log(config_log, OVIS_LERROR, + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_value: bad call(%p,%p).\n", pa, attr); return NULL; } #if DBG_LPA - ovis_log(config_log, OVIS_LDEBUG,"ldmsd_plugattr_value(%p, %s, %s)\n", + ovis_log(app_log, OVIS_LDEBUG,"ldmsd_plugattr_value(%p, %s, %s)\n", pa, attr, key ? key : "NULL"); #endif const char *c; @@ -663,7 +665,7 @@ const char * ldmsd_plugattr_value(struct plugattr *pa, const char *attr, const c c = av_value(lp->avl, attr); if (c) { #if DBG_LPA - ovis_log(config_log, OVIS_LDEBUG, + ovis_log(app_log, OVIS_LDEBUG, "ldmsd_plugattr_value: %s: %s\n", key, c); #endif return c; @@ -674,7 +676,7 @@ const char * ldmsd_plugattr_value(struct plugattr *pa, const char *attr, const c c = av_value(pa->overrides.avl, attr); if (c) { #if DBG_LPA - ovis_log(config_log, OVIS_LDEBUG, + ovis_log(app_log, OVIS_LDEBUG, "ldmsd_plugattr_value: override %s\n", c); #endif return c; @@ -686,7 +688,7 @@ const char * ldmsd_plugattr_value(struct plugattr *pa, const char *attr, const c c = av_value(lp->avl, attr); if (c) { #if DBG_LPA - ovis_log(config_log, OVIS_LDEBUG, + ovis_log(app_log, OVIS_LDEBUG, "ldmsd_plugattr_value: %s: %s\n", key, c); #endif return c; @@ -701,7 +703,7 @@ static int fill_multi(struct attr_value_list *avl, const char *attr, int k, int *valc = 1; *valv = malloc(2*sizeof(char *)); if (!*valv) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_multivalue: out of mem.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_multivalue: out of mem.\n"); return ENOMEM; } (*valv)[0] = av_value_at_idx(avl, k); @@ -712,7 +714,7 @@ static int fill_multi(struct attr_value_list *avl, const char *attr, int k, int *valc = k; *valv = malloc((k + 1)*sizeof(char *)); if (!*valv) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_multivalue: out of mem.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_multivalue: out of mem.\n"); return ENOMEM; } int i = 0; @@ -732,7 +734,7 @@ static int fill_multi(struct attr_value_list *avl, const char *attr, int k, int int ldmsd_plugattr_multivalue(struct plugattr *pa, const char *attr, const char *key, int *valc, char ***valv) { if (!pa || !attr || !valc || !valv) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_multivalue: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_multivalue: bad call.\n"); return EINVAL; } int k; @@ -766,7 +768,7 @@ int ldmsd_plugattr_multivalue(struct plugattr *pa, const char *attr, const char bool ldmsd_plugattr_kw(struct plugattr *pa, const char *kw, const char *key) { if (!pa || !kw) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_kw: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_kw: bad call.\n"); return NULL; } int pos; @@ -798,7 +800,7 @@ bool ldmsd_plugattr_kw(struct plugattr *pa, const char *kw, const char *key) int ldmsd_plugattr_bool(struct plugattr *pa, const char *attr, const char *key, bool *result) { if (!pa || !attr) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_bool: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_bool: bad call.\n"); return -1; } const char *val = ldmsd_plugattr_value(pa, attr, key); @@ -820,7 +822,7 @@ int ldmsd_plugattr_bool(struct plugattr *pa, const char *attr, const char *key, *result = false; break; default: - ovis_log(config_log, OVIS_LERROR, "%s: non-boolean %s=%s\n", + ovis_log(app_log, OVIS_LERROR, "%s: non-boolean %s=%s\n", key, attr, val); return -1; } @@ -832,7 +834,7 @@ int ldmsd_plugattr_bool(struct plugattr *pa, const char *attr, const char *key, int ldmsd_plugattr_s32(struct plugattr *pa, const char *at, const char *key, int32_t *result) { if (!pa || !at || !result) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_s32: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_s32: bad call.\n"); return EINVAL; } const char *val = ldmsd_plugattr_value(pa, at, key); @@ -852,7 +854,7 @@ int ldmsd_plugattr_s32(struct plugattr *pa, const char *at, const char *key, int int ldmsd_plugattr_u32(struct plugattr *pa, const char *at, const char *key, uint32_t *result) { if (!pa || !at || !result) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_s32: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_s32: bad call.\n"); return EINVAL; } const char *val = ldmsd_plugattr_value(pa, at, key); @@ -872,7 +874,7 @@ int ldmsd_plugattr_u32(struct plugattr *pa, const char *at, const char *key, uin int ldmsd_plugattr_s64(struct plugattr *pa, const char *at, const char *key, int64_t *result) { if (!pa || !at || !result) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_s64: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_s64: bad call.\n"); return EINVAL; } const char *val = ldmsd_plugattr_value(pa, at, key); @@ -890,7 +892,7 @@ int ldmsd_plugattr_s64(struct plugattr *pa, const char *at, const char *key, int int ldmsd_plugattr_u64(struct plugattr *pa, const char *at, const char *key, uint64_t *result) { if (!pa || !at || !result) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_u64: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_u64: bad call.\n"); return EINVAL; } const char *val = ldmsd_plugattr_value(pa, at, key); @@ -908,7 +910,7 @@ int ldmsd_plugattr_u64(struct plugattr *pa, const char *at, const char *key, uin int ldmsd_plugattr_f64(struct plugattr *pa, const char *at, const char *key, double *result) { if (!pa || !at || !result) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_f64: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_f64: bad call.\n"); return EINVAL; } const char *val = ldmsd_plugattr_value(pa, at, key); @@ -926,7 +928,7 @@ int ldmsd_plugattr_f64(struct plugattr *pa, const char *at, const char *key, dou int ldmsd_plugattr_szt(struct plugattr *pa, const char *at, const char *key, size_t *result) { if (!pa || !at || !result) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_szt: bad call.\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_szt: bad call.\n"); return EINVAL; } const char *val = ldmsd_plugattr_value(pa, at, key); @@ -959,7 +961,7 @@ static void dump_lp(void *lp, void *a) void ldmsd_plugattr_log(int lvl, struct plugattr *pa, const char *key) { if (!pa) { - ovis_log(config_log, OVIS_LERROR, "ldmsd_plugattr_log miscalled\n"); + ovis_log(app_log, OVIS_LERROR, "ldmsd_plugattr_log miscalled\n"); return; } struct dump_args da; @@ -1019,7 +1021,7 @@ int ldmsd_plugattr_config_check(const char **anames, const char **knames, struct count = 0; while (count < avl->count) { if (pname) { - ovis_log(config_log, OVIS_LWARNING, + ovis_log(app_log, OVIS_LWARNING, "%s: unexpected config attribute %s. " "Check spelling and man page Plugin_%s?\n", pname, av_name(avl, count), pname); @@ -1043,7 +1045,7 @@ int ldmsd_plugattr_config_check(const char **anames, const char **knames, struct if (!found) { unexpected++; if (pname) { - ovis_log(config_log, OVIS_LWARNING, + ovis_log(app_log, OVIS_LWARNING, "%s: unexpected config attribute %s. Check spelling and man page Plugin_%s?\n", pname, k, pname); } @@ -1055,7 +1057,7 @@ int ldmsd_plugattr_config_check(const char **anames, const char **knames, struct count = 0; while (count < kvl->count) { if (pname) { - ovis_log(config_log, OVIS_LWARNING, + ovis_log(app_log, OVIS_LWARNING, "%s: unexpected config keyword %s. Check spelling and man page Plugin_%s?\n", pname, av_name(kvl, count), pname); } @@ -1078,7 +1080,7 @@ int ldmsd_plugattr_config_check(const char **anames, const char **knames, struct if (!found) { unexpected++; if (pname) { - ovis_log(config_log, OVIS_LWARNING, + ovis_log(app_log, OVIS_LWARNING, "%s: unexpected config keyword %s. Check spelling and man page Plugin_%s?\n", pname, k, pname); } diff --git a/ldms/src/ldmsd/ldmsd_plugattr.h b/ldms/src/ldmsd/ldmsd_plugattr.h index 2c7db23ad..ebd48b9c0 100644 --- a/ldms/src/ldmsd/ldmsd_plugattr.h +++ b/ldms/src/ldmsd/ldmsd_plugattr.h @@ -58,19 +58,22 @@ /** The plugin attribute library provides augmenting a config (a/v, kw) with * parsing a/v,kw from a text file. This enables syntax for plugin loading * to load instance-specific configs ahead of their use without requiring: -- multiple calls to config function -- storage of pre-instantiation config arguments to be coded repeatedly in - multiple plugins. - -The expected command syntax uses are -load name=store_csv conf=customizations.store_csv.txt - or -load name=store_csv altheader=1 conf=customizations.store_csv.txt -where any keys like altheader override what is stored in the text file. - -Support for routine option transformations (e.g. to parse numerics or -handling repeated options) is also provided. -*/ + * - multiple calls to config function + * - storage of pre-instantiation config arguments to be coded repeatedly in + * multiple plugins. + * + * The expected command syntax uses are + * load name=store_csv conf=customizations.store_csv.txt + * or + * load name=store_csv altheader=1 conf=customizations.store_csv.txt + * where any keys like altheader override what is stored in the text file. + * + * Support for routine option transformations (e.g. to parse numerics or + * handling repeated options) is also provided. + * + * Currently, the library reports the log messages to the application's + * default log. + */ struct plugattr;