By default not adding message trace to message anymore; added messageIncludingMessageTrace for that

This commit is contained in:
dankito 2024-08-23 12:53:45 +02:00
parent 88f6d53ccb
commit a3dbe8f142
2 changed files with 5 additions and 2 deletions

View File

@ -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) {

View File

@ -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"
}