diff --git a/src/applet/adguard.c b/src/applet/adguard.c index cf70a7c..5f85c13 100644 --- a/src/applet/adguard.c +++ b/src/applet/adguard.c @@ -94,7 +94,6 @@ process* adguard_load(adguard *info, const char *dir) { // load adguard options } else { // configure exist -> modify char *adguard_config_content = read_file(adguard_config_file); char *adguard_config_json = to_json(adguard_config_content); - log_debug("AdGuardHome json configure ->\n%s", adguard_config_json); adguard_config_ret = adguard_config(info, adguard_config_json); free(adguard_config_content); free(adguard_config_json); diff --git a/src/common/json.c b/src/common/json.c index 49cd85b..1b303dd 100644 --- a/src/common/json.c +++ b/src/common/json.c @@ -22,9 +22,11 @@ char* to_json(const char *content) { // convert JSON / TOML / YAML to json forma char *json_content = strdup(json_string); // load string into owner heap free_rust_string(json_string); // free rust string if (strlen(json_content) == 0) { // empty string -> convert error + log_warn("JSON convert error ->\n%s", content); free(json_content); return NULL; } + log_debug("JSON convert result ->\n%s", json_content); return json_content; }