By default not adding message trace to message anymore; added messageIncludingMessageTrace for that
This commit is contained in:
parent
88f6d53ccb
commit
a3dbe8f142
|
@ -41,9 +41,9 @@ open class MessageLogCollector(
|
||||||
|
|
||||||
private fun createMessageForLog(logEntry: MessageLogEntry): String {
|
private fun createMessageForLog(logEntry: MessageLogEntry): String {
|
||||||
val message = if (logEntry.type == MessageLogEntryType.Error) {
|
val message = if (logEntry.type == MessageLogEntryType.Error) {
|
||||||
logEntry.messageTrace + logEntry.message + (if (logEntry.error != null) NewLine + getStackTrace(logEntry.error!!) else "")
|
logEntry.message + (if (logEntry.error != null) NewLine + getStackTrace(logEntry.error!!) else "")
|
||||||
} else {
|
} else {
|
||||||
logEntry.messageTrace + "\n" + prettyPrintFinTsMessage(logEntry.message)
|
prettyPrintFinTsMessage(logEntry.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (options.removeSensitiveDataFromMessageLog) {
|
return if (options.removeSensitiveDataFromMessageLog) {
|
||||||
|
|
|
@ -14,6 +14,9 @@ open class MessageLogEntry(
|
||||||
open val time: Instant = Clock.System.now()
|
open val time: Instant = Clock.System.now()
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
val messageIncludingMessageTrace: String
|
||||||
|
get() = messageTrace + "\n" + message
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "$type $message"
|
return "$type $message"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue