Package feign
Class Logger
- java.lang.Object
-
- feign.Logger
-
- Direct Known Subclasses:
Logger.ErrorLogger,Logger.JavaLogger,Logger.NoOpLogger
public abstract class Logger extends java.lang.ObjectSimple logging abstraction for debug messages. Adapted fromretrofit.RestAdapter.Log.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLogger.ErrorLoggerLogs to System.err.static classLogger.JavaLoggerLogs to the categoryLoggeratLevel.FINE, if loggable.static classLogger.LevelControls the level of logging.static classLogger.NoOpLogger
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidlog(java.lang.String configKey, java.lang.String format, java.lang.Object... args)Override to log requests and responses using your own implementation.protected ResponselogAndRebufferResponse(java.lang.String configKey, Logger.Level logLevel, Response response, long elapsedTime)protected java.io.IOExceptionlogIOException(java.lang.String configKey, Logger.Level logLevel, java.io.IOException ioe, long elapsedTime)protected voidlogRequest(java.lang.String configKey, Logger.Level logLevel, Request request)protected voidlogRetry(java.lang.String configKey, Logger.Level logLevel)protected static java.lang.StringmethodTag(java.lang.String configKey)
-
-
-
Method Detail
-
methodTag
protected static java.lang.String methodTag(java.lang.String configKey)
-
log
protected abstract void log(java.lang.String configKey, java.lang.String format, java.lang.Object... args)Override to log requests and responses using your own implementation. Messages will be http request and response text.- Parameters:
configKey- value ofFeign.configKey(Class, java.lang.reflect.Method)format-format stringargs- arguments applied toformat
-
logRequest
protected void logRequest(java.lang.String configKey, Logger.Level logLevel, Request request)
-
logRetry
protected void logRetry(java.lang.String configKey, Logger.Level logLevel)
-
logAndRebufferResponse
protected Response logAndRebufferResponse(java.lang.String configKey, Logger.Level logLevel, Response response, long elapsedTime) throws java.io.IOException
- Throws:
java.io.IOException
-
logIOException
protected java.io.IOException logIOException(java.lang.String configKey, Logger.Level logLevel, java.io.IOException ioe, long elapsedTime)
-
-