summaryrefslogtreecommitdiffstats
path: root/libnetdata/json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-20 04:49:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-20 04:49:55 +0000
commitab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch)
tree7a900833aad3ccc685712c6c2a7d87576d54f427 /libnetdata/json
parentAdding upstream version 1.40.1. (diff)
downloadnetdata-upstream/1.41.0.tar.xz
netdata-upstream/1.41.0.zip
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/json')
-rw-r--r--libnetdata/json/json.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libnetdata/json/json.c b/libnetdata/json/json.c
index 532b677ce..ec1452911 100644
--- a/libnetdata/json/json.c
+++ b/libnetdata/json/json.c
@@ -22,13 +22,13 @@ int json_tokens = JSON_TOKENS;
#ifdef ENABLE_JSONC
json_object *json_tokenise(char *js) {
if(!js) {
- error("JSON: json string is empty.");
+ netdata_log_error("JSON: json string is empty.");
return NULL;
}
json_object *token = json_tokener_parse(js);
if(!token) {
- error("JSON: Invalid json string.");
+ netdata_log_error("JSON: Invalid json string.");
return NULL;
}
@@ -39,7 +39,7 @@ jsmntok_t *json_tokenise(char *js, size_t len, size_t *count)
{
int n = json_tokens;
if(!js || !len) {
- error("JSON: json string is empty.");
+ netdata_log_error("JSON: json string is empty.");
return NULL;
}
@@ -62,12 +62,12 @@ jsmntok_t *json_tokenise(char *js, size_t len, size_t *count)
}
if (ret == JSMN_ERROR_INVAL) {
- error("JSON: Invalid json string.");
+ netdata_log_error("JSON: Invalid json string.");
freez(tokens);
return NULL;
}
else if (ret == JSMN_ERROR_PART) {
- error("JSON: Truncated JSON string.");
+ netdata_log_error("JSON: Truncated JSON string.");
freez(tokens);
return NULL;
}
@@ -124,7 +124,7 @@ int json_callback_print(JSON_ENTRY *e)
buffer_strcat(wb,"NULL");
break;
}
- info("JSON: %s", buffer_tostring(wb));
+ netdata_log_info("JSON: %s", buffer_tostring(wb));
buffer_free(wb);
return 0;
}
@@ -323,7 +323,7 @@ size_t json_walk_array(char *js, jsmntok_t *t, size_t nest, size_t start, JSON_E
for(i = 0; i < size ; i++) {
ne.pos = i;
if (strlen(e->name) > JSON_NAME_LEN - 24 || strlen(e->fullname) > JSON_FULLNAME_LEN -24) {
- info("JSON: JSON walk_array ignoring element with name:%s fullname:%s",e->name, e->fullname);
+ netdata_log_info("JSON: JSON walk_array ignoring element with name:%s fullname:%s",e->name, e->fullname);
continue;
}
snprintfz(ne.name, JSON_NAME_LEN, "%s[%lu]", e->name, i);