Added fints4k option appendFinTsMessagesToLog to easily configure if FinTS messages should get added to log
This commit is contained in:
parent
9aeca393dc
commit
f160c50d18
|
@ -21,7 +21,7 @@ open class FinTs4kBankingClient(
|
||||||
constructor(callback: BankingClientCallback) : this(FinTsClientConfiguration(), callback)
|
constructor(callback: BankingClientCallback) : this(FinTsClientConfiguration(), callback)
|
||||||
|
|
||||||
constructor(options: FinTsClientOptions, callback: BankingClientCallback)
|
constructor(options: FinTsClientOptions, callback: BankingClientCallback)
|
||||||
: this(FinTsClientConfiguration(net.codinux.banking.fints.config.FinTsClientOptions(options.collectMessageLog, false, options.removeSensitiveDataFromMessageLog, options.closeDialogs, options.version, options.productName)), callback)
|
: this(FinTsClientConfiguration(net.codinux.banking.fints.config.FinTsClientOptions(options.collectMessageLog, false, options.removeSensitiveDataFromMessageLog, options.appendFinTsMessagesToLog, options.closeDialogs, options.version, options.productName)), callback)
|
||||||
|
|
||||||
|
|
||||||
protected open val mapper = FinTs4kMapper()
|
protected open val mapper = FinTs4kMapper()
|
||||||
|
|
|
@ -24,6 +24,8 @@ data class FinTsClientOptions(
|
||||||
*/
|
*/
|
||||||
val removeSensitiveDataFromMessageLog: Boolean = true,
|
val removeSensitiveDataFromMessageLog: Boolean = true,
|
||||||
|
|
||||||
|
val appendFinTsMessagesToLog: Boolean = false,
|
||||||
|
|
||||||
val closeDialogs: Boolean = true,
|
val closeDialogs: Boolean = true,
|
||||||
|
|
||||||
val version: String = "1.0.0", // TODO: get version dynamically
|
val version: String = "1.0.0", // TODO: get version dynamically
|
||||||
|
|
20
README.md
20
README.md
|
@ -167,4 +167,22 @@ fun updateAccountTransactions() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Logging
|
||||||
|
|
||||||
|
BankingClient and fints4k both use [klf](https://github.com/codinux-gmbh/klf), a logging facade for Kotlin (Multiplatform)
|
||||||
|
with appenders for all supported KMP platforms.
|
||||||
|
So logging works on all platforms out of the box. On JVM, if slf4j is on the classpath, logging can be configured with
|
||||||
|
any slf4j compatible logging backend (logback, log4j, JBoss Logging, ...).
|
||||||
|
|
||||||
|
If you want to see all sent and received FinTS messages, set the log level of `net.codinux.banking.fints.log.MessageLogCollector` to `DEBUG`, either via:
|
||||||
|
- your logging framework (e.g. logback)
|
||||||
|
- klf: `net.codinux.log.LoggerFactory.getLogger("net.codinux.banking.fints.log.MessageLogCollector").level = LogLevel.Debug`
|
||||||
|
- `appendFinTsMessagesToLog` option:
|
||||||
|
```kotlin
|
||||||
|
val client = FinTs4kBankingClient(FinTsClientOptions(appendFinTsMessagesToLog = true), SimpleBankingClientCallback())
|
||||||
|
```
|
||||||
|
But be aware, in latter case if you create multiple FinTs4kBankingClient instances, the latest value of `appendFinTsMessagesToLog`
|
||||||
|
overrides the value of all previous FinTs4kBankingClient instances. As with all other options, this configures the logger's level globally,
|
||||||
|
so the latest configured log level value wins.
|
Loading…
Reference in New Issue