Dump syntaxerror fixed and readed Debug Possibility on premise in coding time

This commit is contained in:
René Linder 2022-02-21 08:34:43 +01:00
parent 5e8359cdc1
commit 36c8ea1ac5

View file

@ -68,7 +68,7 @@ DeclareModule lhs_log_ext
#Error #Error
#Warning #Warning
#Info #Info
#Debug #Debugging
EndEnumeration EndEnumeration
Declare IsCreated(UUID.s) Declare IsCreated(UUID.s)
@ -287,7 +287,7 @@ Module lhs_log_ext
EndIf EndIf
EndProcedure EndProcedure
Procedure Out(UUID.s, ToLog.s) Procedure Out(UUID.s, ToLog.s, debugger.i = #NoDebug)
If IsCreated(UUID) If IsCreated(UUID)
LockMutex(Logger(UUID)\Mutex) LockMutex(Logger(UUID)\Mutex)
LastElement(Logger(UUID)\Messages()) LastElement(Logger(UUID)\Messages())
@ -304,9 +304,13 @@ Module lhs_log_ext
EndIf EndIf
EndProcedure EndProcedure
Procedure OutL(UUID.s, LogType.i, ToLog.s) Procedure OutL(UUID.s, LogType.i, ToLog.s, debugger.i = #NoDebug)
If IsCreated(UUID) If IsCreated(UUID)
If LogType <= Logger(UUID)\LogLevel If debugger = #Debug
LogType = #Debugging
EndIf
If LogType <= Logger(UUID)\LogLevel Or debugger = #Debug
Select LogType Select LogType
Case #Info Case #Info
ToLog = "Info: " + ToLog ToLog = "Info: " + ToLog
@ -314,8 +318,10 @@ Module lhs_log_ext
ToLog = "Warning: " + ToLog ToLog = "Warning: " + ToLog
Case #Error Case #Error
ToLog = "Error: " + ToLog ToLog = "Error: " + ToLog
Case #Debugging
ToLog = "Debug: " + ToLog
Default Default
ToLog = "Error: " + ToLog ToLog = "Debug: " + ToLog
EndSelect EndSelect
Out(UUID, ToLog, debugger) Out(UUID, ToLog, debugger)
ProcedureReturn #True ProcedureReturn #True