diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 18d02229dd..8464e373d5 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -231,10 +231,10 @@ src_object = window.locked_by.src_object // Insert src_object info if(src_object) - entry += "\nUsing: [src_object.type] [REF(src_object)]" + entry += "Using: [src_object.type] [REF(src_object)]" // Insert message if(message) - entry += "\n[message]" + entry += "[message]" WRITE_LOG(GLOB.tgui_log, entry) /* Close open log handles. This should be called as late as possible, and no logging should hapen after. */ diff --git a/code/controllers/configuration/entries/logging.dm b/code/controllers/configuration/entries/logging.dm new file mode 100644 index 0000000000..2b08d62d54 --- /dev/null +++ b/code/controllers/configuration/entries/logging.dm @@ -0,0 +1,3 @@ +/// forces log_href for tgui +/datum/config_entry/flag/emergency_tgui_logging + config_entry_value = FALSE diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 5f567f1360..970e34cabe 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -76,9 +76,15 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( to_chat(src, "Your previous action was ignored because you've done too many in a second") return - //Logs all hrefs, except chat pings - if(!(href_list["_src_"] == "chat" && href_list["proc"] == "ping" && LAZYLEN(href_list) == 2)) - log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") + + // Tgui Topic middleware + if(tgui_Topic(href_list)) + if(CONFIG_GET(flag/emergency_tgui_logging)) + log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") + return + + //Logs all hrefs + log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") //byond bug ID:2256651 if (asset_cache_job && (asset_cache_job in completed_asset_jobs)) @@ -105,10 +111,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( handle_statpanel_click(href_list) return - // Tgui Topic middleware - if(tgui_Topic(href_list)) - return - // Admin PM if(href_list["priv_msg"]) cmd_admin_pm(href_list["priv_msg"],null) diff --git a/tgstation.dme b/tgstation.dme index f733aee27c..45c16fab9d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -293,6 +293,7 @@ #include "code\controllers\configuration\entries\fail2topic.dm" #include "code\controllers\configuration\entries\game_options.dm" #include "code\controllers\configuration\entries\general.dm" +#include "code\controllers\configuration\entries\logging.dm" #include "code\controllers\configuration\entries\persistence.dm" #include "code\controllers\configuration\entries\plushies.dm" #include "code\controllers\configuration\entries\policy.dm"