From 1635e98a4cd6fabf8fe5c016db4b2024fdfd59f3 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Thu, 29 Jun 2023 20:02:38 +0200 Subject: [PATCH] Implement logger checks for preprocessor --- logger.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/logger.gd b/logger.gd index 8c2b063..cdfccb6 100644 --- a/logger.gd +++ b/logger.gd @@ -30,7 +30,7 @@ func _ready() -> void: func diag(script:String,message:String,preproc:bool = false) -> void: if enable and enable_diag: - if preproc: + if preproc and Preprocessor.enabled: var logmsg = "[color=gray](" + script + ") [DIAG] [b]" + preprocessor.pre(0,script,message) + "[/b][/color]" print_rich(logmsg) emit_signal("logevent","DIAG",script,message,logmsg) @@ -41,7 +41,7 @@ func diag(script:String,message:String,preproc:bool = false) -> void: func info(script:String,message:String,preproc:bool = true) -> void: if enable: - if preproc: + if preproc and Preprocessor.enabled: var logmsg = "(" + script + ") [INFO] [b]" + preprocessor.pre(1,script,message) + "[/b]" print_rich(logmsg) emit_signal("logevent","INFO",script,message,logmsg) @@ -52,7 +52,7 @@ func info(script:String,message:String,preproc:bool = true) -> void: func warn(script:String,message:String,preproc:bool = true) -> void: if enable: - if preproc: + if preproc and Preprocessor.enabled: var logmsg = "[color=orange](" + script + ") [WARN] [b]" + preprocessor.pre(2,script,message) + "[/b][/color]" print_rich(logmsg) emit_signal("logevent","WARN",script,message,logmsg) @@ -63,7 +63,7 @@ func warn(script:String,message:String,preproc:bool = true) -> void: func error(script:String,message:String,preproc:bool = true) -> void: if enable: - if preproc: + if preproc and Preprocessor.enabled: var logmsg = "[color=red](" + script + ") [ERROR] [b]" + preprocessor.pre(3,script,message) + "[/b][/color]" print_rich(logmsg) emit_signal("logevent","ERROR",script,message,logmsg)