From 4447eb122febed8a0acf13dbd92455f0f9b6fe49 Mon Sep 17 00:00:00 2001 From: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Date: Thu, 25 Aug 2022 01:12:37 -0400 Subject: [PATCH] Fixes SQL game logs throwing a bunch of SQL errors (#15773) * Increases the list nesting by one on log entries for the mass insert log * Updates the name of the time column because of course I had to get it wrong :) --- code/__HELPERS/logging/_logging.dm | 2 +- .../master_files/code/controllers/subsystem/dbcore.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/logging/_logging.dm b/code/__HELPERS/logging/_logging.dm index 2cc03731920..3d6704aeb35 100644 --- a/code/__HELPERS/logging/_logging.dm +++ b/code/__HELPERS/logging/_logging.dm @@ -79,7 +79,7 @@ GLOBAL_LIST_INIT(testing_global_profiler, list("_PROFILE_NAME" = "Global")) SSdbcore.add_log_to_mass_insert_queue( format_table_name("game_log"), list( - "time" = SQLtime(), + "datetime" = SQLtime(), "round_id" = "[GLOB.round_id]", "ckey" = key_name(src), "loc" = loc_name(src), diff --git a/modular_skyrat/master_files/code/controllers/subsystem/dbcore.dm b/modular_skyrat/master_files/code/controllers/subsystem/dbcore.dm index 56240ce947f..22f7c66e21b 100644 --- a/modular_skyrat/master_files/code/controllers/subsystem/dbcore.dm +++ b/modular_skyrat/master_files/code/controllers/subsystem/dbcore.dm @@ -17,7 +17,7 @@ * * log_entry - Associative list representing all of the information that needs to be logged. * Default format is as follows, for the `game_log` table (even if this could be used for another table): * list( - * "time" = SQLtime(), + * "datetime" = SQLtime(), * "round_id" = "[GLOB.round_id]", * "ckey" = key_name(src), * "loc" = loc_name(src), @@ -33,7 +33,7 @@ if(!queued_log_entries_by_table[table]) queued_log_entries_by_table[table] = list() - queued_log_entries_by_table[table] += log_entry + queued_log_entries_by_table[table] += list(log_entry) if(length(queued_log_entries_by_table[table]) < CONFIG_GET(number/sql_game_log_min_bundle_size)) return