Telecomms chat logging (#39276)

* Add telecomms logging to a new file (telecomms.log)

* Add LOG_TELECOMMS config option
This commit is contained in:
Patrick Chieppe
2018-07-24 22:38:25 +12:00
committed by oranges
parent f10ca48e92
commit 308bfdb1ed
6 changed files with 24 additions and 0 deletions
+4
View File
@@ -103,6 +103,10 @@
//reusing the PDA option because I really don't think news comments are worth a config option
WRITE_LOG(GLOB.world_pda_log, "COMMENT: [text]")
/proc/log_telecomms(text)
if (CONFIG_GET(flag/log_telecomms))
WRITE_LOG(GLOB.world_telecomms_log, "TCOMMS: [text]")
/proc/log_chat(text)
if (CONFIG_GET(flag/log_pda))
//same thing here
+2
View File
@@ -18,6 +18,8 @@ GLOBAL_VAR(sql_error_log)
GLOBAL_PROTECT(sql_error_log)
GLOBAL_VAR(world_pda_log)
GLOBAL_PROTECT(world_pda_log)
GLOBAL_VAR(world_telecomms_log)
GLOBAL_PROTECT(world_telecomms_log)
GLOBAL_VAR(world_manifest_log)
GLOBAL_PROTECT(world_manifest_log)
GLOBAL_VAR(query_debug_log)
@@ -49,6 +49,8 @@
/datum/config_entry/flag/log_pda // log pda messages
/datum/config_entry/flag/log_telecomms // log telecomms messages
/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
/datum/config_entry/flag/log_world_topic // log all world.Topic() calls
@@ -190,4 +190,15 @@
if(length(receive))
SSblackbox.LogBroadcast(frequency)
var/spans_part = ""
if(length(spans))
spans_part = "("
for(var/S in spans)
spans_part = "[spans_part] [S]"
spans_part = "[spans_part] ) "
var/lang_name = data["language"]
log_telecomms("[datum_info_line(virt.source)] : \[[get_radio_name(frequency)]\] [spans_part]\"[message]\" language: [lang_name] at [atom_loc_line(get_turf(src.source))]")
QDEL_IN(virt, 50) // Make extra sure the virtualspeaker gets qdeleted
+2
View File
@@ -87,6 +87,7 @@ GLOBAL_PROTECT(security_mode)
GLOB.world_game_log = "[GLOB.log_directory]/game.log"
GLOB.world_attack_log = "[GLOB.log_directory]/attack.log"
GLOB.world_pda_log = "[GLOB.log_directory]/pda.log"
GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log"
GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log"
GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log"
GLOB.sql_error_log = "[GLOB.log_directory]/sql.log"
@@ -102,6 +103,7 @@ GLOBAL_PROTECT(security_mode)
start_log(GLOB.world_game_log)
start_log(GLOB.world_attack_log)
start_log(GLOB.world_pda_log)
start_log(GLOB.world_telecomms_log)
start_log(GLOB.world_manifest_log)
start_log(GLOB.world_href_log)
start_log(GLOB.world_qdel_log)
+3
View File
@@ -109,6 +109,9 @@ LOG_ATTACK
## log pda messages
LOG_PDA
## log telecomms messages
LOG_TELECOMMS
## log prayers
LOG_PRAYER