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 LogLevelgetLogLevel(HttpRequestLoggingContext loggingOptions) Gets theLogLevelused to log the HTTP request.logRequest(ClientLogger logger, HttpRequestLoggingContext loggingOptions) Logs the HTTP request.default voidlogRequestSync(ClientLogger logger, HttpRequestLoggingContext loggingOptions) Logs the HTTP request.
-
Method Details
-
getLogLevel
Gets theLogLevelused to log the HTTP request.By default, this will return
LogLevel.INFORMATIONAL.- Parameters:
loggingOptions- The information available during request logging.- Returns:
- The
LogLevelused to log the HTTP request.
-
logRequest
Logs the HTTP request.To get the
LogLevelused to log the HTTP request usegetLogLevel(HttpRequestLoggingContext).- Parameters:
logger- TheClientLoggerused 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 theLogLevelused to log the HTTP request usegetLogLevel(HttpRequestLoggingContext).- Parameters:
logger- TheClientLoggerused to log the HTTP request.loggingOptions- The information available during request logging.
-