Add missing log message and origin sanitization

This commit is contained in:
JeremyStar™ 2024-04-15 21:43:04 +02:00
parent cdd4924668
commit 4cd4f12f95
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -200,12 +200,12 @@ func lcrash(message: String, origin: String = "Bessere Tests") -> void:
await terminate(69)
# Self explanitory
func lresu(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 505, false, "RESU", "[color=white]", "[/color]")
func ldiag(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 0)
func lverb(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 1)
func linfo(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 2)
func lwarn(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 3)
func lerror(message: String, origin: String = "Bessere Tests") -> void: _log(message, origin, 4)
func lresu(message: String, origin: String = "Bessere Tests") -> void: _log(message, lsanitize(origin), 505, false, "RESU", "[color=white]", "[/color]")
func ldiag(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 0)
func lverb(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 1)
func linfo(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 2)
func lwarn(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 3)
func lerror(message: String, origin: String = "Bessere Tests") -> void: _log(lsanitize(message), lsanitize(origin), 4)
# Message sanitization
func lsanitize(message: String) -> String: return message.replace("[", "[lb]").replace("]", "[rb]").replace("[lb[rb]", "[lb]").replace("\n", "\\n")