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)