Bugfix lhs_log_ext and add IsCreated to public modul
This commit is contained in:
		
							parent
							
								
									606f5159d4
								
							
						
					
					
						commit
						7ab2255ff0
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue