From 2bc1290ab6efaea2fa1ae8c0b6fd0f1e140034b5 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Sat, 27 Jun 2015 15:37:29 -0700 Subject: [PATCH] Adds optional runtime logging Logs runtime, changing runtime location at the end of the day, etc. Has a config option that defaults to off to keep it from bugging coders. --- code/controllers/configuration.dm | 5 +++++ config/config.txt | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 3f314079849..4f25bb4a6ab 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -337,6 +337,11 @@ config.irc_first_connection_alert = 1 if("aggressive_changelog") config.aggressive_changelog = 1 + if("log_runtimes") + var/newlog = file("data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log") + if (world.log != newlog) + world.log << "Now logging runtimes to data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log" + world.log = newlog else diary << "Unknown setting in configuration: '[name]'" diff --git a/config/config.txt b/config/config.txt index cdfd19f9f34..f7ec7eda026 100644 --- a/config/config.txt +++ b/config/config.txt @@ -190,4 +190,7 @@ NOTIFY_NEW_PLAYER_AGE 0 #PANIC_BUNKER ## Uncomment to have the changelog file automatically open when a user connects and hasn't seen the latest changelog -#AGGRESSIVE_CHANGELOG \ No newline at end of file +#AGGRESSIVE_CHANGELOG + +## Uncomment to have the game log runtimes to the log folder. (Note: this disables normal output in dd/ds, so it should be left off for testing. +#LOG_RUNTIMES \ No newline at end of file