mirror of
				https://github.com/InsanusMokrassar/KSLog.git
				synced 2025-10-31 11:30:28 +00:00 
			
		
		
		
	isolate logging of KSLog'gers to avoid problems with parallel logs perform
This commit is contained in:
		| @@ -4,6 +4,12 @@ import dev.inmo.kslog.common.CallbackKSLog | ||||
| import dev.inmo.kslog.common.KSLog | ||||
|  | ||||
| infix operator fun KSLog.plus(other: KSLog) = CallbackKSLog { l, t, m, e -> | ||||
|     val resultOfFirst = runCatching { | ||||
|         this@plus.performLog(l, t, m, e) | ||||
|     } | ||||
|     val resultOfSecond = runCatching { | ||||
|         other.performLog(l, t, m, e) | ||||
|     } | ||||
|     resultOfFirst.onFailure { throw it } | ||||
|     resultOfSecond.onFailure { throw it } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user