Increase error logging to diagnose server conking (#15662)

* Increase error logging to diagnose server conking

* more logging and db retry

* whoops

* rename error() to log_error() to better reflect what it does
Move a bunch of world.log messages to log_error

* Fix compile error

---------

Co-authored-by: Werner <Arrow768@users.noreply.github.com>
This commit is contained in:
Wildkins
2023-03-13 17:51:39 -04:00
committed by GitHub
parent 62e25f5890
commit c369124fe9
42 changed files with 94 additions and 91 deletions

View File

@@ -36,7 +36,7 @@
return
if (!establish_db_connection(dbcon))
error("SQL connection failed while attempting to delete a note!")
log_error("SQL connection failed while attempting to delete a note!")
return
var/count = 0 //failsafe from unban procs
@@ -52,12 +52,12 @@
if (count == 0)
to_chat(usr, "<span class='warning'>Database update failed due to a note id not being present in the database.</span>")
error("Database update failed due to a note id not being present in the database.")
log_error("Database update failed due to a note id not being present in the database.")
return
if (count > 1)
to_chat(usr, "<span class='warning'>Database update failed due to multiple notes having the same ID. Contact the database admin.</span>")
error("Database update failed due to multiple notes having the same ID. Contact the database admin.")
log_error("Database update failed due to multiple notes having the same ID. Contact the database admin.")
return
switch (note_edit)
@@ -92,7 +92,7 @@
admin_ckey = ckey(admin_ckey)
if (!establish_db_connection(dbcon))
error("SQL connection failed while attempting to view a player's notes!")
log_error("SQL connection failed while attempting to view a player's notes!")
return
var/dat = "<div align='center'><h3>Notes Look-up Panel</h3><br>"