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 LogLevel
getLogLevel
(HttpResponseLoggingContext loggingOptions) Gets theLogLevel
used to log the HTTP response.logResponse
(ClientLogger logger, HttpResponseLoggingContext loggingOptions) Logs the HTTP response.default HttpResponse
logResponseSync
(ClientLogger logger, HttpResponseLoggingContext loggingOptions) Logs the HTTP response.
-
Method Details
-
getLogLevel
Gets theLogLevel
used to log the HTTP response.By default, this will return
LogLevel.INFORMATIONAL
.- Parameters:
loggingOptions
- The information available during response logging.- Returns:
- The
LogLevel
used to log the HTTP response.
-
logResponse
Logs the HTTP response.To get the
LogLevel
used to log the HTTP response usegetLogLevel(HttpResponseLoggingContext)
.- Parameters:
logger
- TheClientLogger
used 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 theLogLevel
used to log the HTTP response usegetLogLevel(HttpResponseLoggingContext)
.- Parameters:
logger
- TheClientLogger
used to log the response.loggingOptions
- The information available during response logging.- Returns:
- A response that returns the HTTP response that was logged.
-