mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
Merge pull request #4175 from Mloc/runtimelog
Fixes runtime logging and makes it a config option.
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
||||||
var/log_pda = 0 // log pda messages
|
var/log_pda = 0 // log pda messages
|
||||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||||
|
var/log_runtime = 0 // logs world.log to a file
|
||||||
var/sql_enabled = 1 // for sql switching
|
var/sql_enabled = 1 // for sql switching
|
||||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||||
var/allow_vote_restart = 0 // allow votes to restart
|
var/allow_vote_restart = 0 // allow votes to restart
|
||||||
@@ -242,6 +243,9 @@
|
|||||||
if ("log_hrefs")
|
if ("log_hrefs")
|
||||||
config.log_hrefs = 1
|
config.log_hrefs = 1
|
||||||
|
|
||||||
|
if ("log_runtime")
|
||||||
|
config.log_runtime = 1
|
||||||
|
|
||||||
if("allow_admin_ooccolor")
|
if("allow_admin_ooccolor")
|
||||||
config.allow_admin_ooccolor = 1
|
config.allow_admin_ooccolor = 1
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
/world/New()
|
/world/New()
|
||||||
//logs
|
//logs
|
||||||
var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day")
|
var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day")
|
||||||
log = file("data/logs/runtime/[time2text(world.realtime,"YYYY-MM")].log") //funtimelog
|
|
||||||
href_logfile = file("data/logs/[date_string] hrefs.htm")
|
href_logfile = file("data/logs/[date_string] hrefs.htm")
|
||||||
diary = file("data/logs/[date_string].log")
|
diary = file("data/logs/[date_string].log")
|
||||||
diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
|
diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
|
||||||
@@ -28,6 +27,9 @@
|
|||||||
// dumb and hardcoded but I don't care~
|
// dumb and hardcoded but I don't care~
|
||||||
config.server_name += " #[(world.port % 1000) / 100]"
|
config.server_name += " #[(world.port % 1000) / 100]"
|
||||||
|
|
||||||
|
if(config && config.log_runtime)
|
||||||
|
log = file("data/logs/runtime/[time2text(world.realtime,"YYYY-MM-DD-(hh-mm-ss)")]-runtime.log")
|
||||||
|
|
||||||
callHook("startup")
|
callHook("startup")
|
||||||
//Emergency Fix
|
//Emergency Fix
|
||||||
load_mods()
|
load_mods()
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ LOG_PDA
|
|||||||
## log all Topic() calls (for use by coders in tracking down Topic issues)
|
## log all Topic() calls (for use by coders in tracking down Topic issues)
|
||||||
# LOG_HREFS
|
# LOG_HREFS
|
||||||
|
|
||||||
|
## log world.log and runtime errors to a file
|
||||||
|
# LOG_RUNTIME
|
||||||
|
|
||||||
## log admin warning messages
|
## log admin warning messages
|
||||||
##LOG_ADMINWARN ## Also duplicates a bunch of other messages.
|
##LOG_ADMINWARN ## Also duplicates a bunch of other messages.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user