From ed1a06a9edf3f47dbae42fb5ac06e07f60ab0834 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 28 Aug 2017 02:20:16 -0500 Subject: [PATCH] Adds separate log for sql errors with no config check --- code/__HELPERS/_logging.dm | 3 +-- code/_globalvars/logging.dm | 2 ++ code/game/world.dm | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 05b6aa1a15..cde5e0b4e7 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -97,8 +97,7 @@ WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]CHAT: [text]") /proc/log_sql(text) - if(config.sql_enabled) - WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]SQL: [text]") + WRITE_FILE(GLOB.sql_error_log, "\[[time_stamp()]]SQL: [text]") //This replaces world.log so it displays both in DD and the file /proc/log_world(text) diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 72ca1e9328..5be6a8dbaa 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -12,6 +12,8 @@ GLOBAL_VAR(round_id) GLOBAL_PROTECT(round_id) GLOBAL_VAR(config_error_log) GLOBAL_PROTECT(config_error_log) +GLOBAL_VAR(sql_error_log) +GLOBAL_PROTECT(sql_error_log) GLOBAL_LIST_EMPTY(bombers) GLOBAL_PROTECT(bombers) diff --git a/code/game/world.dm b/code/game/world.dm index f5b45a46ca..0eeb29fa50 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -3,7 +3,7 @@ SetupExternalRSC() - GLOB.config_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = file("data/logs/config_error.log") //temporary file used to record errors with loading config, moved to log directory once logging is set bl + GLOB.config_error_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = file("data/logs/config_error.log") //temporary file used to record errors with loading config, moved to log directory once logging is set bl make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) @@ -79,6 +79,7 @@ GLOB.world_attack_log = file("[GLOB.log_directory]/attack.log") GLOB.world_runtime_log = file("[GLOB.log_directory]/runtime.log") GLOB.world_href_log = file("[GLOB.log_directory]/hrefs.html") + GLOB.sql_error_log = file("[GLOB.log_directory]/sql.log") WRITE_FILE(GLOB.world_game_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------") WRITE_FILE(GLOB.world_attack_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------") WRITE_FILE(GLOB.world_runtime_log, "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------")