From cb673535d730c5ffca8cb3d35bd1731dced8aeb3 Mon Sep 17 00:00:00 2001 From: Ralf Steppacher Date: Mon, 18 Nov 2024 15:33:35 +0100 Subject: [PATCH] #32591 log token on level TRACE --- .../health/des/cdr/clientvm/handler/FileHandlingBase.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/swisscom/health/des/cdr/clientvm/handler/FileHandlingBase.kt b/src/main/kotlin/com/swisscom/health/des/cdr/clientvm/handler/FileHandlingBase.kt index 9393dcf..6281c65 100644 --- a/src/main/kotlin/com/swisscom/health/des/cdr/clientvm/handler/FileHandlingBase.kt +++ b/src/main/kotlin/com/swisscom/health/des/cdr/clientvm/handler/FileHandlingBase.kt @@ -89,7 +89,9 @@ abstract class FileHandlingBase( this[CDR_PROCESSING_MODE_HEADER] = mode.value this[AZURE_TRACE_ID_HEADER] = traceId if (accessToken != null) { - this[HttpHeaders.AUTHORIZATION] = "Bearer $accessToken" + this[HttpHeaders.AUTHORIZATION] = "Bearer $accessToken".also { header: String -> + logger.trace { "Authorization header set: $header " } + } } this.build() } @@ -109,6 +111,7 @@ abstract class FileHandlingBase( retryIoErrorsThrice.execute { _ -> val authResult: IAuthenticationResult = securedApp.acquireToken(clientCredentialParams).get() logger.debug { "Token taken from ${authResult.metadata().tokenSource()}" } + logger.trace { "Token: ${authResult.accessToken()}" } authResult.accessToken() } }.fold(