From 36c8ea1ac52e67a7439a7e30828eeee80b4c29f8 Mon Sep 17 00:00:00 2001 From: Ground0 Date: Mon, 21 Feb 2022 08:34:43 +0100 Subject: [PATCH] Dump syntaxerror fixed and readed Debug Possibility on premise in coding time --- SYS/lhs_log_ext.pbi | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SYS/lhs_log_ext.pbi b/SYS/lhs_log_ext.pbi index 4c4763c..21ae0e4 100644 --- a/SYS/lhs_log_ext.pbi +++ b/SYS/lhs_log_ext.pbi @@ -68,7 +68,7 @@ DeclareModule lhs_log_ext #Error #Warning #Info - #Debug + #Debugging EndEnumeration Declare IsCreated(UUID.s) @@ -287,7 +287,7 @@ Module lhs_log_ext EndIf EndProcedure - Procedure Out(UUID.s, ToLog.s) + Procedure Out(UUID.s, ToLog.s, debugger.i = #NoDebug) If IsCreated(UUID) LockMutex(Logger(UUID)\Mutex) LastElement(Logger(UUID)\Messages()) @@ -304,9 +304,13 @@ Module lhs_log_ext EndIf EndProcedure - Procedure OutL(UUID.s, LogType.i, ToLog.s) + Procedure OutL(UUID.s, LogType.i, ToLog.s, debugger.i = #NoDebug) If IsCreated(UUID) - If LogType <= Logger(UUID)\LogLevel + If debugger = #Debug + LogType = #Debugging + EndIf + + If LogType <= Logger(UUID)\LogLevel Or debugger = #Debug Select LogType Case #Info ToLog = "Info: " + ToLog @@ -314,8 +318,10 @@ Module lhs_log_ext ToLog = "Warning: " + ToLog Case #Error ToLog = "Error: " + ToLog + Case #Debugging + ToLog = "Debug: " + ToLog Default - ToLog = "Error: " + ToLog + ToLog = "Debug: " + ToLog EndSelect Out(UUID, ToLog, debugger) ProcedureReturn #True