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.
| 限定符和类型 | 类和说明 |
|---|---|
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.
|
| 限定符和类型 | 字段和说明 |
|---|---|
private ProxyConnection |
connection |
private ProxyConnectionLogger.LogDispatch |
dispatch |
private String |
fqcn |
private org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
ProxyConnectionLogger(ProxyConnection connection) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 © 2022 Zodiac. All rights reserved.