From a6789c5717a313aa7a806e0de65361072744bcfb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 23 May 2017 21:14:53 +0200 Subject: [PATCH] Update logs --- command.c | 12 ++++++------ configuration.c | 13 +++++-------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/command.c b/command.c index 3c47349216..f4ea51c1d8 100644 --- a/command.c +++ b/command.c @@ -1313,7 +1313,7 @@ static bool command_event_save_config(const char *config_path, return false; } - snprintf(s, len, "%s \"%s\".", + snprintf(s, len, "[Config]: %s \"%s\".", msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO), path_get(RARCH_PATH_CONFIG)); RARCH_LOG("%s\n", s); @@ -1351,7 +1351,7 @@ static bool command_event_save_core_config(void) else { runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true); - RARCH_ERR("%s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET)); + RARCH_ERR("[Config]: %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET)); return false; } @@ -1395,7 +1395,7 @@ static bool command_event_save_core_config(void) if (!found_path) { /* Fallback to system time... */ - RARCH_WARN("%s\n", + RARCH_WARN("[Config]: %s\n", msg_hash_to_str(MSG_CANNOT_INFER_NEW_CONFIG_PATH)); fill_dated_filename(config_name, file_path_str(FILE_PATH_CONFIG_EXTENSION), @@ -1440,7 +1440,7 @@ static void command_event_save_current_config(enum override_type type) { case OVERRIDE_NONE: if (path_is_empty(RARCH_PATH_CONFIG)) - strlcpy(msg, "Config directory not set, cannot save configuration.", + strlcpy(msg, "[Config]: Config directory not set, cannot save configuration.", sizeof(msg)); else command_event_save_config(path_get(RARCH_PATH_CONFIG), msg, sizeof(msg)); @@ -1450,7 +1450,7 @@ static void command_event_save_current_config(enum override_type type) if (config_save_overrides(type)) { strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_SAVED_SUCCESSFULLY), sizeof(msg)); - RARCH_LOG("[overrides] %s\n", msg); + RARCH_LOG("[Config]: [overrides] %s\n", msg); /* set overrides to active so the original config can be restored after closing content */ @@ -1459,7 +1459,7 @@ static void command_event_save_current_config(enum override_type type) else { strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_ERROR_SAVING), sizeof(msg)); - RARCH_ERR("[overrides] %s\n", msg); + RARCH_ERR("[Config]: [overrides] %s\n", msg); } break; } diff --git a/configuration.c b/configuration.c index d747f1774c..a854ecc032 100644 --- a/configuration.c +++ b/configuration.c @@ -3060,21 +3060,18 @@ bool config_load_shader_preset(void) static void parse_config_file(void) { - if (!path_is_empty(RARCH_PATH_CONFIG)) + if (path_is_empty(RARCH_PATH_CONFIG)) { - RARCH_LOG("Config: loading config from: %s.\n", path_get(RARCH_PATH_CONFIG)); - } - else - { - RARCH_LOG("Loading default config.\n"); + RARCH_LOG("[Config]: Loading default config.\n"); if (!path_is_empty(RARCH_PATH_CONFIG)) - RARCH_LOG("Config: found default config: %s.\n", path_get(RARCH_PATH_CONFIG)); + RARCH_LOG("[Config]: found default config: %s.\n", path_get(RARCH_PATH_CONFIG)); } + RARCH_LOG("[Config]: loading config from: %s.\n", path_get(RARCH_PATH_CONFIG)); if (config_load_file(path_get(RARCH_PATH_CONFIG), false, config_get_ptr())) return; - RARCH_ERR("Config: couldn't find config at path: \"%s\"\n", path_get(RARCH_PATH_CONFIG)); + RARCH_ERR("[Config]: couldn't find config at path: \"%s\"\n", path_get(RARCH_PATH_CONFIG)); }