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.
Modifier and Type | Class and Description |
---|---|
private class |
ProxyConnectionLogger.LocationAwareLogggerDispatch
Dispatcher for a LocationAwareLogger.
|
private static interface |
ProxyConnectionLogger.LogDispatch |
private class |
ProxyConnectionLogger.LoggerDispatch
Fallback dispatch if a LocationAwareLogger is not available from
the SLF4J LoggerFactory.
|
Modifier and Type | Field and Description |
---|---|
private ProxyConnection |
connection |
private ProxyConnectionLogger.LogDispatch |
dispatch |
private String |
fqcn |
private org.slf4j.Logger |
logger |
Constructor and Description |
---|
ProxyConnectionLogger(ProxyConnection connection) |
Modifier and Type | Method and Description |
---|---|
protected void |
debug(String message,
Object... params) |
protected void |
debug(String message,
Throwable t) |
protected void |
error(String message,
Object... params) |
protected void |
error(String message,
Throwable t) |
private String |
fullMessage(String message) |
protected void |
info(String message,
Object... params) |
protected void |
info(String message,
Throwable t) |
protected void |
log(int level,
String message,
Object... params) |
protected void |
log(int level,
String message,
Throwable t) |
protected void |
warn(String message,
Object... params) |
protected void |
warn(String message,
Throwable t) |
private final ProxyConnection connection
private final ProxyConnectionLogger.LogDispatch dispatch
private final org.slf4j.Logger logger
private final String fqcn
public ProxyConnectionLogger(ProxyConnection connection)
Copyright © 2009–2017 LittleShoot. All rights reserved.