diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config.c b/src/config.c index c4aecf0..ca2d48e 100644 --- a/src/config.c +++ b/src/config.c @@ -38,7 +38,7 @@ void config_load() char *path = get_config_path(); root = json_load_file(path, 0, &error); if (!root) { - log_msg(LOG_ERROR, "load_config", "json parse error: line %d: %s", + log_msg(LOG_WARNING, "load_config", "json parse error: line %d: %s", error.line, error.text); free(path); return; @@ -46,7 +46,7 @@ void config_load() free(path); if (!json_is_object(root)) { - log_msg(LOG_ERROR, "load_config", "json root is not object"); + log_msg(LOG_WARNING, "load_config", "json root is not object"); json_decref(root); return; } @@ -85,7 +85,7 @@ int config_save() _config.access_token); if (!root) { - log_msg(LOG_ERROR, "register_app", "json pack error: line %d: %s", + log_msg(LOG_WARNING, "register_app", "json pack error: line %d: %s", error.line, error.text); return -1; } @@ -96,14 +96,14 @@ int config_save() if (stat(dir, &st)) { if (mkdir(dir, S_IRWXU)) { free(config_path); - log_msg(LOG_ERROR, "load_config", "failed to create config dir"); + log_msg(LOG_WARNING, "load_config", "failed to create config dir"); return -1; } } free(config_path); if (json_dump_file(root, get_config_path(), 0)) { - log_msg(LOG_ERROR, "load_config", "unable to save json"); + log_msg(LOG_WARNING, "load_config", "unable to save json"); json_decref(root); return -1; } |