if (g == NULL)
return -1;
#if COLLECT_DEBUG
- yajl_gen_config(g, yajl_gen_beautify, 1);
yajl_gen_config(g, yajl_gen_validate_utf8, 1);
#endif
#else /* !HAVE_YAJL_V2 */
yajl_gen_config conf = {0};
-#if COLLECT_DEBUG
- conf.beautify = 1;
- conf.indentString = " ";
-#endif
yajl_gen g = yajl_gen_alloc(&conf, NULL);
if (g == NULL)
return -1;
do { \
int status = (f); \
if (status != 0) { \
- ERROR("format_kairosdb: %s = %d", #f, status); \
+ ERROR("format_kairosdb: %s failed with status %d", #f, status); \
return status; \
} \
} while (0)
if (g == NULL)
return ENOMEM;
#if COLLECT_DEBUG
- yajl_gen_config(g, yajl_gen_beautify, 1);
yajl_gen_config(g, yajl_gen_validate_utf8, 1);
#endif
#else /* !HAVE_YAJL_V2 */
yajl_gen_config conf = {0};
-#if COLLECT_DEBUG
- conf.beautify = 1;
- conf.indentString = " ";
-#endif
yajl_gen g = yajl_gen_alloc(&conf, NULL);
if (g == NULL)
return ENOMEM;