Package org.littleshoot.proxy.impl
Class ProxyConnectionLogger
- java.lang.Object
-
- org.littleshoot.proxy.impl.ProxyConnectionLogger
-
class ProxyConnectionLogger extends Object
A helper class that logs messages for ProxyConnections. All it does is make sure that the Channel and current state are always included in the log messages (if available).
Note that this depends on us using a LocationAwareLogger so that we can report the line numbers of the caller rather than this helper class. If the SLF4J binding does not provide a LocationAwareLogger, then a fallback to Logger is provided.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classProxyConnectionLogger.LocationAwareLoggerDispatchDispatcher for a LocationAwareLogger.private static interfaceProxyConnectionLogger.LogDispatchprivate classProxyConnectionLogger.LoggerDispatchFallback dispatch if a LocationAwareLogger is not available from the SLF4J LoggerFactory.
-
Field Summary
Fields Modifier and Type Field Description private ProxyConnectionconnectionprivate ProxyConnectionLogger.LogDispatchdispatchprivate Stringfqcnprivate org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ProxyConnectionLogger(ProxyConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddebug(String message, Object... params)protected voiddebug(String message, Throwable t)protected voiderror(String message, Object... params)protected voiderror(String message, Throwable t)private StringfullMessage(String message)protected voidinfo(String message, Object... params)protected voidinfo(String message, Throwable t)protected voidlog(int level, String message, Object... params)protected voidlog(int level, String message, Throwable t)protected voidwarn(String message, Object... params)protected voidwarn(String message, Throwable t)
-
-
-
Field Detail
-
connection
private final ProxyConnection connection
-
dispatch
private final ProxyConnectionLogger.LogDispatch dispatch
-
logger
private final org.slf4j.Logger logger
-
fqcn
private final String fqcn
-
-
Constructor Detail
-
ProxyConnectionLogger
public ProxyConnectionLogger(ProxyConnection connection)
-
-