From dcad5ddaf689a7a3cb3bb3ca3987152ae4ff04b7 Mon Sep 17 00:00:00 2001 From: Prajon Shakya Date: Mon, 3 Apr 2023 16:57:56 -0400 Subject: [PATCH] Converting logs "information" to "debug" --- src/Medidata.MAuth.Core/MAuthAuthenticator.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Medidata.MAuth.Core/MAuthAuthenticator.cs b/src/Medidata.MAuth.Core/MAuthAuthenticator.cs index 200fab4..8ca7f28 100644 --- a/src/Medidata.MAuth.Core/MAuthAuthenticator.cs +++ b/src/Medidata.MAuth.Core/MAuthAuthenticator.cs @@ -51,7 +51,7 @@ public async Task AuthenticateRequest(HttpRequestMessage request) { try { - _logger.LogInformation("Initiating Authentication of the request."); + _logger.LogDebug("Initiating Authentication of the request."); var authHeader = request.GetAuthHeaderValue(); var version = authHeader.GetVersionFromAuthenticationHeader(); @@ -103,9 +103,12 @@ public async Task AuthenticateRequest(HttpRequestMessage request) private async Task Authenticate(HttpRequestMessage request, MAuthVersion version, Guid signedAppUuid) { - var logMessage = "Mauth-client attempting to authenticate request from app with mauth app uuid " + - $"{signedAppUuid} to app with mauth app uuid {_options.ApplicationUuid} using version {version}"; - _logger.LogInformation(logMessage); + _logger.LogDebug( + "Mauth-client attempting to authenticate request from app with mauth app uuid "+ + "{signedAppUuid} to app with mauth app uuid {_options.ApplicationUuid} using version {version}", + signedAppUuid, + _options.ApplicationUuid, + version); var mAuthCore = MAuthCoreFactory.Instantiate(version); var authInfo = GetAuthenticationInfo(request, mAuthCore); @@ -144,9 +147,10 @@ private bool IsSignatureTimeValid(DateTimeOffset signedTime) private async Task> SendApplicationInfoRequest(Guid applicationUuid) { - var logMessage = "Mauth-client requesting from mAuth service application info not available " + - $"in the local cache for app uuid {applicationUuid}."; - _logger.LogInformation(logMessage); + _logger.LogDebug( + "Mauth-client requesting from mAuth service application info not available " + + "in the local cache for app uuid {applicationUuid}.", + applicationUuid); var retrier = new MAuthRequestRetrier(_lazyHttpClient.Value); var response = await retrier.GetSuccessfulResponse( @@ -157,8 +161,9 @@ private async Task> SendApplicationInfoRequest(Guid var result = await response.Content.FromResponse().ConfigureAwait(false); - logMessage = $"Mauth-client application info for app uuid {applicationUuid} cached in memory."; - _logger.LogInformation(logMessage); + _logger.LogDebug( + "Mauth-client application info for app uuid {applicationUuid} cached in memory.", + applicationUuid); var cacheResult = new CacheResult {