mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Refactors dellogging into SSgarbage/Shutdown (#26135)
* Refactors dellogging into SSgarbage/Shutdown * list
This commit is contained in:
committed by
duncathan salt
parent
909c75c5e5
commit
bc72b2e288
@@ -47,6 +47,21 @@ SUBSYSTEM_DEF(garbage)
|
|||||||
msg += "TGR:[round((totalgcs/(totaldels+totalgcs))*100, 0.01)]%"
|
msg += "TGR:[round((totalgcs/(totaldels+totalgcs))*100, 0.01)]%"
|
||||||
..(msg)
|
..(msg)
|
||||||
|
|
||||||
|
/datum/controller/subsystem/garbage/Shutdown()
|
||||||
|
//Adds the del() log to world.log in a format condensable by the runtime condenser found in tools
|
||||||
|
if(didntgc.len || sleptDestroy.len)
|
||||||
|
var/list/dellog = list()
|
||||||
|
for(var/path in didntgc)
|
||||||
|
dellog += "Path : [path] \n"
|
||||||
|
dellog += "Failures : [didntgc[path]] \n"
|
||||||
|
if(path in sleptDestroy)
|
||||||
|
dellog += "Sleeps : [sleptDestroy[path]] \n"
|
||||||
|
sleptDestroy -= path
|
||||||
|
for(var/path in sleptDestroy)
|
||||||
|
dellog += "Path : [path] \n"
|
||||||
|
dellog += "Sleeps : [sleptDestroy[path]] \n"
|
||||||
|
log_world(dellog.Join())
|
||||||
|
|
||||||
/datum/controller/subsystem/garbage/fire()
|
/datum/controller/subsystem/garbage/fire()
|
||||||
HandleToBeQueued()
|
HandleToBeQueued()
|
||||||
if(state == SS_RUNNING)
|
if(state == SS_RUNNING)
|
||||||
|
|||||||
@@ -590,22 +590,6 @@ SUBSYSTEM_DEF(ticker)
|
|||||||
|
|
||||||
CHECK_TICK
|
CHECK_TICK
|
||||||
|
|
||||||
//Adds the del() log to world.log in a format condensable by the runtime condenser found in tools
|
|
||||||
if(SSgarbage.didntgc.len || SSgarbage.sleptDestroy.len)
|
|
||||||
var/dellog = ""
|
|
||||||
for(var/path in SSgarbage.didntgc)
|
|
||||||
dellog += "Path : [path] \n"
|
|
||||||
dellog += "Failures : [SSgarbage.didntgc[path]] \n"
|
|
||||||
if(path in SSgarbage.sleptDestroy)
|
|
||||||
dellog += "Sleeps : [SSgarbage.sleptDestroy[path]] \n"
|
|
||||||
SSgarbage.sleptDestroy -= path
|
|
||||||
for(var/path in SSgarbage.sleptDestroy)
|
|
||||||
dellog += "Path : [path] \n"
|
|
||||||
dellog += "Sleeps : [SSgarbage.sleptDestroy[path]] \n"
|
|
||||||
log_world(dellog)
|
|
||||||
|
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
//Collects persistence features
|
//Collects persistence features
|
||||||
SSpersistence.CollectData()
|
SSpersistence.CollectData()
|
||||||
|
|
||||||
|
|||||||
@@ -210,14 +210,6 @@
|
|||||||
/world/proc/OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent)
|
/world/proc/OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent)
|
||||||
feedback_set_details("[feedback_c]","[feedback_r]")
|
feedback_set_details("[feedback_c]","[feedback_r]")
|
||||||
log_game("<span class='boldannounce'>Rebooting World. [reason]</span>")
|
log_game("<span class='boldannounce'>Rebooting World. [reason]</span>")
|
||||||
#ifdef dellogging
|
|
||||||
var/log = file("data/logs/del.log")
|
|
||||||
log << time2text(world.realtime)
|
|
||||||
for(var/index in del_counter)
|
|
||||||
var/count = del_counter[index]
|
|
||||||
if(count > 10)
|
|
||||||
log << "#[count]\t[index]"
|
|
||||||
#endif
|
|
||||||
if(GLOB.blackbox)
|
if(GLOB.blackbox)
|
||||||
GLOB.blackbox.save_all_data_to_sql()
|
GLOB.blackbox.save_all_data_to_sql()
|
||||||
Master.Shutdown() //run SS shutdowns
|
Master.Shutdown() //run SS shutdowns
|
||||||
|
|||||||
Reference in New Issue
Block a user