mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
Slightly modifies the logging of runtimes (#24800)
* moves errors to vscode style * OOOPS forgot to push
This commit is contained in:
@@ -72,13 +72,13 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
|
||||
var/skipcount = abs(GLOB.error_cooldown[erroruid]) - 1
|
||||
GLOB.error_cooldown[erroruid] = 0
|
||||
if(skipcount > 0)
|
||||
log_world("\[[time_stamp()]] Skipped [skipcount] runtimes in [e.file],[e.line].")
|
||||
log_world("\[[time_stamp()]] Skipped [skipcount] runtimes in [e.file]:[e.line].")
|
||||
GLOB.error_cache.logError(e, skipCount = skipcount)
|
||||
GLOB.error_last_seen[erroruid] = world.time
|
||||
GLOB.error_cooldown[erroruid] = cooldown
|
||||
|
||||
// This line will log a runtime summary to a file which can be publicly distributed without sending player data
|
||||
log_runtime_summary("Runtime in [e.file],[e.line]: [e]")
|
||||
log_runtime_summary("Runtime in [e.file]:[e.line]: [e]")
|
||||
|
||||
// The detailed error info needs some tweaking to make it look nice
|
||||
var/list/srcinfo = null
|
||||
@@ -131,8 +131,8 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
|
||||
desclines += " (This error will now be silenced for [ERROR_SILENCE_TIME / 600] minutes)"
|
||||
|
||||
// Now to actually output the error info...
|
||||
log_world("\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]")
|
||||
log_runtime_txt("Runtime in [e.file],[e.line]: [e]")
|
||||
log_world("\[[time_stamp()]] Runtime in [e.file]:[e.line]: [e]")
|
||||
log_runtime_txt("Runtime in [e.file],[e.line]: [e]") // All other runtimes show as [e.file]:[e.line] except this one to prevent fuckery with analyzing both old and new runtimes. runtime.log should stay in the [e.file],[e.line] format.
|
||||
for(var/line in desclines)
|
||||
log_world(line)
|
||||
log_runtime_txt(line)
|
||||
|
||||
@@ -117,7 +117,7 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache)
|
||||
// from the same source hasn't been shown too recently
|
||||
if(error_source.next_message_at <= world.time)
|
||||
var/const/viewtext = "\[view]" // Nesting these in other brackets went poorly
|
||||
log_debug("Runtime in [e.file],[e.line]: [html_encode(e.name)] [error_entry.makeLink(viewtext)]")
|
||||
log_debug("Runtime in [e.file]:[e.line]: [html_encode(e.name)] [error_entry.makeLink(viewtext)]")
|
||||
error_source.next_message_at = world.time + ERROR_MSG_DELAY
|
||||
|
||||
/datum/ErrorViewer/ErrorSource
|
||||
@@ -128,7 +128,7 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache)
|
||||
if(!istype(e))
|
||||
name = "\[[time_stamp()]] Uncaught exceptions"
|
||||
return
|
||||
name = "\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]"
|
||||
name = "\[[time_stamp()]] Runtime in [e.file]:[e.line]: [e]"
|
||||
|
||||
/datum/ErrorViewer/ErrorSource/showTo(user, datum/ErrorViewer/back_to, linear)
|
||||
if(!istype(back_to))
|
||||
@@ -156,10 +156,10 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache)
|
||||
name = "\[[time_stamp()]] Uncaught exception: [e]"
|
||||
return
|
||||
if(skipCount)
|
||||
name = "\[[time_stamp()]] Skipped [skipCount] runtimes in [e.file],[e.line]."
|
||||
name = "\[[time_stamp()]] Skipped [skipCount] runtimes in [e.file]:[e.line]."
|
||||
isSkipCount = TRUE
|
||||
return
|
||||
name = "\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]"
|
||||
name = "\[[time_stamp()]] Runtime in [e.file]:[e.line]: [e]"
|
||||
exc = e
|
||||
if(istype(desclines))
|
||||
for(var/line in desclines)
|
||||
|
||||
Reference in New Issue
Block a user