diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageContext.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageContext.kt index 3c4a59cb..8177783e 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageContext.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageContext.kt @@ -7,6 +7,7 @@ import net.dankito.banking.fints.model.BankData class MessageContext( val jobNumber: Int, val dialogNumber: Int, + val messageNumber: Int, val bank: BankData, val account: AccountData? ) \ No newline at end of file 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 a7bf63a0..24d27e49 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 @@ -62,7 +62,7 @@ open class MessageLogCollector { protected open fun createMessageTraceString(type: MessageLogEntryType, context: MessageContext): String { - return "${twoDigits(context.jobNumber)}_${twoDigits(context.dialogNumber)}_" + + return "${twoDigits(context.jobNumber)}_${twoDigits(context.dialogNumber)}_${twoDigits(context.messageNumber)}_" + "${context.bank.bankCode}_${context.bank.customerId}" + "${ context.account?.let { "_${it.accountIdentifier}" } ?: "" } " + "${getTypeString(type)}:" diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/JobContext.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/JobContext.kt index 783924e1..40e6e1f1 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/JobContext.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/JobContext.kt @@ -49,6 +49,8 @@ open class JobContext( protected open val jobNumber: Int = ++JobCount + protected open var dialogNumber: Int = 0 + open fun startNewDialog(closeDialog: Boolean = true, dialogId: String = DialogContext.InitialDialogId, versionOfSecurityProcedure: VersionDesSicherheitsverfahrens = VersionDesSicherheitsverfahrens.Version_2, @@ -62,6 +64,8 @@ open class JobContext( this._dialogs.add(newDialogContext) + this.dialogNumber++ + return newDialogContext }