Implemented also logging dialog number
This commit is contained in:
parent
4c70412058
commit
fba6c2a0d5
|
@ -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?
|
||||
)
|
|
@ -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)}:"
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue