@@ -9,13 +9,12 @@ namespace APIMatic.Core.Utilities.Logger
99 /// <summary>
1010 /// Provides logging functionality for SDK operations.
1111 /// </summary>
12- internal class SdkLogger
12+ internal class SdkLogger : ISdkLogger
1313 {
1414 private readonly ILogger _logger ;
1515 private readonly Func < LogLevel , LogLevel > _getOverridenLogLevel ;
1616 private readonly RequestLoggingConfiguration _requestConfiguration ;
1717 private readonly ResponseLoggingConfiguration _responseConfiguration ;
18- private readonly bool _isConfigured ;
1918 private readonly bool _maskSensitiveHeaders ;
2019
2120 /// <summary>
@@ -28,7 +27,6 @@ public SdkLogger(SdkLoggingConfiguration loggingConfiguration)
2827 _getOverridenLogLevel = level => loggingConfiguration . LogLevel . GetValueOrDefault ( level ) ;
2928 _requestConfiguration = loggingConfiguration . RequestLoggingConfiguration ;
3029 _responseConfiguration = loggingConfiguration . ResponseLoggingConfiguration ;
31- _isConfigured = loggingConfiguration . IsConfigured ;
3230 _maskSensitiveHeaders = loggingConfiguration . MaskSensitiveHeaders ;
3331 }
3432
@@ -38,7 +36,6 @@ public SdkLogger(SdkLoggingConfiguration loggingConfiguration)
3836 /// <param name="request">The request to be logged.</param>
3937 public void LogRequest ( CoreRequest request )
4038 {
41- if ( ! _isConfigured ) return ;
4239 var localLogLevel = _getOverridenLogLevel ( LogLevel . Information ) ;
4340 var contentTypeHeader = request . Headers . GetContentType ( ) ;
4441 var url = _requestConfiguration . IncludeQueryInPath ? request . QueryUrl : ParseQueryPath ( request . QueryUrl ) ;
@@ -66,7 +63,6 @@ public void LogRequest(CoreRequest request)
6663 /// <param name="response">The response to be logged.</param>
6764 public void LogResponse ( CoreResponse response )
6865 {
69- if ( ! _isConfigured ) return ;
7066 var localLogLevel = _getOverridenLogLevel ( LogLevel . Information ) ;
7167 var contentTypeHeader = response . Headers . GetContentType ( ) ;
7268 var contentLengthHeader = response . Headers . GetContentLength ( ) ;
0 commit comments