mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2026-11-03 01:53:54 +00:00
add defaultMessageFormatterWithErrorPrint
This commit is contained in:
1 parent
42db9da058
commit
669afe481d
2 files changed
+3
-1
No files matched your search
@@ -5,4 +5,4 @@ typealias MessageFormatter = (l: LogLevel, t: String?, m: Any, Throwable?) -> St
|
||||
inline fun MessageFormatter(noinline formatter: MessageFormatter) = formatter
|
||||
typealias MessageFilter = (l: LogLevel, t: String?, Throwable?) -> Boolean
|
||||
val defaultMessageFormatter: MessageFormatter = { l, t, m, _ -> "[$l] ${t ?.let { "$it " } ?: ""}- $m" }
|
||||
|
||||
val defaultMessageFormatterWithErrorPrint: MessageFormatter = { l, t, m, e -> "[$l] ${t ?.let { "$it " } ?: ""}- $m${e ?.let { ": ${it.stackTraceToString()}" } ?: ""}" }
|
||||
Reference in new issue
Block a user