From 5df170a6446a98b4a4d3e7eac16ec87b22f3104d Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:06:23 +0300 Subject: [PATCH 1/3] log everything to game for logis --- code/modules/logging/log_holder.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/logging/log_holder.dm b/code/modules/logging/log_holder.dm index 85a436076c84e..4d20689d7fd5c 100644 --- a/code/modules/logging/log_holder.dm +++ b/code/modules/logging/log_holder.dm @@ -327,6 +327,16 @@ ADMIN_VERB(log_viewer_new, R_ADMIN|R_DEBUG, "View Round Logs", "View the rounds data = recursive_jsonify(data, semver_store) log_category.create_entry(message, data, semver_store) +// BANDASTATION EDIT START - Logis +/datum/log_holder/Log(category, message, list/data) + // Duplicate it for Logis + if(category != LOG_CATEGORY_GAME) + var/duplicate_category = LOG_CATEGORY_GAME + var/duplicate_message = "[capitalize(category)]: [message]" + ..(duplicate_category, duplicate_message, data) + . = ..() +// BANDASTATION EDIT END + /// Recursively converts an associative list of datums into their jsonified(list) form /datum/log_holder/proc/recursive_jsonify(list/data_list, list/semvers) if(isnull(data_list)) From b3f34c6e0782f3dbdc56517a95108003bdb3b662 Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:13:05 +0300 Subject: [PATCH 2/3] uppertext is better --- code/modules/logging/log_holder.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/logging/log_holder.dm b/code/modules/logging/log_holder.dm index 4d20689d7fd5c..f5d2c79b5f526 100644 --- a/code/modules/logging/log_holder.dm +++ b/code/modules/logging/log_holder.dm @@ -332,7 +332,7 @@ ADMIN_VERB(log_viewer_new, R_ADMIN|R_DEBUG, "View Round Logs", "View the rounds // Duplicate it for Logis if(category != LOG_CATEGORY_GAME) var/duplicate_category = LOG_CATEGORY_GAME - var/duplicate_message = "[capitalize(category)]: [message]" + var/duplicate_message = "[uppertext(category)]: [message]" ..(duplicate_category, duplicate_message, data) . = ..() // BANDASTATION EDIT END From 7f383a2a3c394c10e9f9bcd9c4edcf57019c8362 Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:17:55 +0300 Subject: [PATCH 3/3] move it to core --- code/modules/logging/log_holder.dm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/code/modules/logging/log_holder.dm b/code/modules/logging/log_holder.dm index f5d2c79b5f526..68d0ecd2c177f 100644 --- a/code/modules/logging/log_holder.dm +++ b/code/modules/logging/log_holder.dm @@ -321,22 +321,20 @@ ADMIN_VERB(log_viewer_new, R_ADMIN|R_DEBUG, "View Round Logs", "View the rounds Log(LOG_CATEGORY_INTERNAL_CATEGORY_NOT_FOUND, message, data) CRASH("Attempted to log to a category that doesn't exist! [category]") + // BANDASTATION EDIT START - Logis + // Duplicate it for Logis + if(category != LOG_CATEGORY_GAME) + var/duplicate_category = LOG_CATEGORY_GAME + var/duplicate_message = "[uppertext(category)]: [message]" + Log(duplicate_category, duplicate_message, data) + // BANDASTATION EDIT END + var/list/semver_store = null if(length(data)) semver_store = list() data = recursive_jsonify(data, semver_store) log_category.create_entry(message, data, semver_store) -// BANDASTATION EDIT START - Logis -/datum/log_holder/Log(category, message, list/data) - // Duplicate it for Logis - if(category != LOG_CATEGORY_GAME) - var/duplicate_category = LOG_CATEGORY_GAME - var/duplicate_message = "[uppertext(category)]: [message]" - ..(duplicate_category, duplicate_message, data) - . = ..() -// BANDASTATION EDIT END - /// Recursively converts an associative list of datums into their jsonified(list) form /datum/log_holder/proc/recursive_jsonify(list/data_list, list/semvers) if(isnull(data_list))