Package com.azure.core.http.policy
Interface HttpRequestLogger
- 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 requests in
HttpLoggingPolicy
.-
Method Summary
Modifier and TypeMethodDescriptiondefault LogLevel
getLogLevel
(HttpRequestLoggingContext loggingOptions) Gets theLogLevel
used to log the HTTP request.logRequest
(ClientLogger logger, HttpRequestLoggingContext loggingOptions) Logs the HTTP request.default void
logRequestSync
(ClientLogger logger, HttpRequestLoggingContext loggingOptions) Logs the HTTP request.
-
Method Details
-
getLogLevel
Gets theLogLevel
used to log the HTTP request.By default, this will return
LogLevel.INFORMATIONAL
.- Parameters:
loggingOptions
- The information available during request logging.- Returns:
- The
LogLevel
used to log the HTTP request.
-
logRequest
Logs the HTTP request.To get the
LogLevel
used to log the HTTP request usegetLogLevel(HttpRequestLoggingContext)
.- Parameters:
logger
- TheClientLogger
used to log the HTTP request.loggingOptions
- The information available during request logging.- Returns:
- A reactive response that indicates that the HTTP request has been logged.
-
logRequestSync
Logs the HTTP request. To get theLogLevel
used to log the HTTP request usegetLogLevel(HttpRequestLoggingContext)
.- Parameters:
logger
- TheClientLogger
used to log the HTTP request.loggingOptions
- The information available during request logging.
-