Bugfix lhs_log_ext and add IsCreated to public modul

This commit is contained in:
René Linder 2021-05-24 14:45:58 +02:00
parent 606f5159d4
commit 7ab2255ff0

View file

@ -65,7 +65,7 @@ DeclareModule lhs_log_ext
#Warning
#Error
EndEnumeration
Declare IsCreated(UUID.s)
Declare SetLogFile(UUID.s, LogFileName.s)
Declare SetMaxSize(UUID.s, Megabyte.i)
Declare SetLogLevel(UUID.s, Level.i)
@ -86,7 +86,7 @@ Module lhs_log_ext
Procedure.s Create(Name.s)
Define.s InternalUUID
If Len(Name) > 0 And LockMutex(CreateLoggerMutex)
If Len(Name) > 0 And TryLockMutex(CreateLoggerMutex)
InternalUUID = CreateUUID()
AddElement(LoggerUUID())
LoggerUUID() = InternalUUID
@ -104,9 +104,7 @@ Module lhs_log_ext
Logger(InternalUUID)\LogDateFormat.s = "%yyyy.%mm.%dd %hh:%ii:%ss"
UnlockMutex(CreateLoggerMutex)
ProcedureReturn InternalUUID
EndIf
UnlockMutex(CreateLoggerMutex)
EndProcedure
Procedure IsCreated(UUID.s)