Implement logger checks for preprocessor
This commit is contained in:
parent
0653dc85bc
commit
1635e98a4c
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue