Implemented also logging dialog number

This commit is contained in:
dankito 2021-11-13 00:17:18 +01:00
parent 4c70412058
commit fba6c2a0d5
3 changed files with 6 additions and 1 deletions

View File

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

View File

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

View File

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