Package com.azure.core.http.policy
Interface HttpResponseLogger
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Manages logging HTTP responses in
HttpLoggingPolicy.-
Method Summary
Modifier and TypeMethodDescriptiondefault LogLevelgetLogLevel(HttpResponseLoggingContext loggingOptions) Gets theLogLevelused to log the HTTP response.logResponse(ClientLogger logger, HttpResponseLoggingContext loggingOptions) Logs the HTTP response.default HttpResponselogResponseSync(ClientLogger logger, HttpResponseLoggingContext loggingOptions) Logs the HTTP response.
-
Method Details
-
getLogLevel
Gets theLogLevelused to log the HTTP response.By default, this will return
LogLevel.INFORMATIONAL.- Parameters:
loggingOptions- The information available during response logging.- Returns:
- The
LogLevelused to log the HTTP response.
-
logResponse
Logs the HTTP response.To get the
LogLevelused to log the HTTP response usegetLogLevel(HttpResponseLoggingContext).- Parameters:
logger- TheClientLoggerused to log the response.loggingOptions- The information available during response logging.- Returns:
- A reactive response that returns the HTTP response that was logged.
-
logResponseSync
default HttpResponse logResponseSync(ClientLogger logger, HttpResponseLoggingContext loggingOptions) Logs the HTTP response. To get theLogLevelused to log the HTTP response usegetLogLevel(HttpResponseLoggingContext).- Parameters:
logger- TheClientLoggerused to log the response.loggingOptions- The information available during response logging.- Returns:
- A response that returns the HTTP response that was logged.
-