Added option appendFinTsMessagesToLog to easily configure if FinTS messages should be added to log by default
This commit is contained in:
parent
b0c2f38bd6
commit
b3cb76e77d
|
@ -17,6 +17,8 @@ import net.codinux.banking.fints.response.client.GetAccountTransactionsResponse
|
||||||
import net.codinux.banking.fints.response.segments.AccountType
|
import net.codinux.banking.fints.response.segments.AccountType
|
||||||
import net.codinux.banking.fints.response.segments.BankParameters
|
import net.codinux.banking.fints.response.segments.BankParameters
|
||||||
import net.codinux.banking.fints.util.BicFinder
|
import net.codinux.banking.fints.util.BicFinder
|
||||||
|
import net.codinux.log.LogLevel
|
||||||
|
import net.codinux.log.LoggerFactory
|
||||||
|
|
||||||
|
|
||||||
open class FinTsClient(
|
open class FinTsClient(
|
||||||
|
@ -37,6 +39,15 @@ open class FinTsClient(
|
||||||
protected open val bicFinder = BicFinder()
|
protected open val bicFinder = BicFinder()
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
LoggerFactory.getLogger("net.codinux.banking.fints.log.MessageLogCollector").level = if (config.options.appendFinTsMessagesToLog) {
|
||||||
|
LogLevel.Debug
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
open suspend fun getAccountDataAsync(bankCode: String, loginName: String, password: String): GetAccountDataResponse {
|
open suspend fun getAccountDataAsync(bankCode: String, loginName: String, password: String): GetAccountDataResponse {
|
||||||
return getAccountDataAsync(GetAccountDataParameter(bankCode, loginName, password))
|
return getAccountDataAsync(GetAccountDataParameter(bankCode, loginName, password))
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,12 @@ 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
|
||||||
val productName: String = "15E53C26816138699C7B6A3E8"
|
val productName: String = "15E53C26816138699C7B6A3E8" // TODO: extract constant // TODO: get product number for fints4k and Bankmeister (if we stick with that name)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val product: ProductData by lazy { ProductData(productName, version) }
|
val product: ProductData by lazy { ProductData(productName, version) }
|
||||||
|
|
Loading…
Reference in New Issue