Simplified getting error logger
This commit is contained in:
parent
6b6dfd48b8
commit
f309251285
|
@ -45,11 +45,7 @@ open class MessageLogCollector {
|
|||
val type = MessageLogEntryType.Error
|
||||
val messageToLog = createMessage(type, message, context, false)
|
||||
|
||||
if (e != null) {
|
||||
getLogger(loggingClass).error(e) { messageToLog }
|
||||
} else {
|
||||
getLogger(loggingClass).error { messageToLog }
|
||||
}
|
||||
LoggerFactory.getLogger(loggingClass).error(e) { messageToLog }
|
||||
|
||||
val errorStackTrace = if (e != null) NewLine + getStackTrace(e) else ""
|
||||
|
||||
|
@ -149,8 +145,4 @@ open class MessageLogCollector {
|
|||
return if (indexOf16thLine < 0) stackTraceString else stackTraceString.substring(0, indexOf16thLine)
|
||||
}
|
||||
|
||||
protected open fun getLogger(loggingClass: KClass<*>): Logger {
|
||||
return LoggerFactory.getLogger(loggingClass)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue