diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt index e91f5de2..44d10787 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt @@ -41,9 +41,9 @@ open class MessageLogCollector( private fun createMessageForLog(logEntry: MessageLogEntry): String { 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 { - logEntry.messageTrace + "\n" + prettyPrintFinTsMessage(logEntry.message) + prettyPrintFinTsMessage(logEntry.message) } return if (options.removeSensitiveDataFromMessageLog) { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/MessageLogEntry.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/MessageLogEntry.kt index 8fe67592..70641031 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/MessageLogEntry.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/MessageLogEntry.kt @@ -14,6 +14,9 @@ open class MessageLogEntry( open val time: Instant = Clock.System.now() ) { + val messageIncludingMessageTrace: String + get() = messageTrace + "\n" + message + override fun toString(): String { return "$type $message" }