Added support for varying log levels configurable in the server config (see log_level in default.conf)

Error logs now properly print to stderr when possible
Colour-coded logs
Addressed a scenario in which outgoing packet writes could get hung up
Fixed interface incorrect definition message on server startup
This commit is contained in:
Ceikry
2023-03-01 08:01:14 +00:00
committed by Ryan
parent e1faa64af7
commit 88a2f354b4
171 changed files with 723 additions and 475 deletions
+3 -1
View File
@@ -2,8 +2,10 @@ package core
import core.api.PersistWorld
import core.api.getItemName
import core.api.log
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.tools.Log
import org.json.simple.JSONArray
import org.json.simple.JSONObject
import org.json.simple.parser.JSONParser
@@ -38,7 +40,7 @@ class ServerStore : PersistWorld {
fileMap[key] = data
counter++
} catch (e: Exception){
SystemLogger.logErr(this::class.java, "Failed parsing ${storeFile.name} - stack trace below.")
log(this::class.java, Log.ERR, "Failed parsing ${storeFile.name} - stack trace below.")
e.printStackTrace()
return@forEach
}