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.
@FunctionalInterface public interface HttpRequestLogger
Manages logging HTTP requests inHttpLoggingPolicy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default LogLevelgetLogLevel(HttpRequestLoggingContext loggingOptions)Gets theLogLevelused to log the HTTP request.Mono<Void>logRequest(ClientLogger logger, HttpRequestLoggingContext loggingOptions)Logs the HTTP request.
-
-
-
Method Detail
-
getLogLevel
default LogLevel getLogLevel(HttpRequestLoggingContext loggingOptions)
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
Mono<Void> logRequest(ClientLogger logger, HttpRequestLoggingContext loggingOptions)
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.
-
-