Issue #5193 - Updating logging per review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
1690e9d30d
commit
46402bc382
|
@ -92,7 +92,8 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onBinaryFrame({}, {}) - events.onBinary={}", BufferUtil.toDetailString(buffer), fin, events.onBinary);
|
LOG.debug("onBinaryFrame({}, {}) - events.onBinary={}, activeMessage={}",
|
||||||
|
BufferUtil.toDetailString(buffer), fin, events.onBinary, activeMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (events.onBinary == null)
|
if (events.onBinary == null)
|
||||||
|
@ -254,7 +255,8 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onTextFrame({}, {}) - events.onText={}", BufferUtil.toDetailString(buffer), fin, events.onText);
|
LOG.debug("onTextFrame({}, {}) - events.onText={}, activeMessage={}",
|
||||||
|
BufferUtil.toDetailString(buffer), fin, events.onText, activeMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (events.onText == null)
|
if (events.onText == null)
|
||||||
|
@ -303,10 +305,8 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
if (message == null)
|
LOG.debug("onTextMessage([{}] \"{}\") - events.onText={}",
|
||||||
LOG.debug("onTextMessage(<null>) - events.onText={}", events.onText);
|
message.length(), TextUtil.maxStringLength(60, message), events.onText);
|
||||||
else
|
|
||||||
LOG.debug("onTextMessage([{}] \"{}\") - events.onText={}", message.length(), TextUtil.maxStringLength(60, message), events.onText);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (events.onText != null)
|
if (events.onText != null)
|
||||||
|
|
|
@ -73,11 +73,12 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onBinaryFrame({}, {}) - webSocketListener:{}, webSocketPartialListener:{}, listener:{}",
|
LOG.debug("onBinaryFrame({}, {}) - webSocketListener={}, webSocketPartialListener={}, listener={}, activeMessage={}",
|
||||||
BufferUtil.toDetailString(buffer), fin,
|
BufferUtil.toDetailString(buffer), fin,
|
||||||
(listener instanceof WebSocketListener),
|
(listener instanceof WebSocketListener),
|
||||||
(listener instanceof WebSocketPartialListener),
|
(listener instanceof WebSocketPartialListener),
|
||||||
listener.getClass().getName());
|
listener.getClass().getName(),
|
||||||
|
activeMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listener instanceof WebSocketListener)
|
if (listener instanceof WebSocketListener)
|
||||||
|
@ -116,7 +117,7 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onBinaryMessage([{}]) - webSocketListener:{}, listener:{}",
|
LOG.debug("onBinaryMessage([{}]) - webSocketListener={}, listener={}",
|
||||||
data.length,
|
data.length,
|
||||||
(listener instanceof WebSocketListener),
|
(listener instanceof WebSocketListener),
|
||||||
this.listener.getClass().getName());
|
this.listener.getClass().getName());
|
||||||
|
@ -143,7 +144,7 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onClose({},{}) - listener:{}", statusCode, reason, this.listener.getClass().getName());
|
LOG.debug("onClose({},{}) - listener={}", statusCode, reason, this.listener.getClass().getName());
|
||||||
}
|
}
|
||||||
listener.onWebSocketClose(statusCode, reason);
|
listener.onWebSocketClose(statusCode, reason);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +154,7 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onConnect({}) - listener:{}", session, this.listener.getClass().getName());
|
LOG.debug("onConnect({}) - listener={}", session, this.listener.getClass().getName());
|
||||||
}
|
}
|
||||||
listener.onWebSocketConnect(session);
|
listener.onWebSocketConnect(session);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +164,7 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onError({}) - listener:{}", cause.getClass().getName(), this.listener.getClass().getName());
|
LOG.debug("onError({}) - listener={}", cause.getClass().getName(), this.listener.getClass().getName());
|
||||||
}
|
}
|
||||||
listener.onWebSocketError(cause);
|
listener.onWebSocketError(cause);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +174,7 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onFrame({}) - frameListener:{}, pingPongListener:{}, listener:{}",
|
LOG.debug("onFrame({}) - frameListener={}, pingPongListener={}, listener={}",
|
||||||
frame,
|
frame,
|
||||||
(listener instanceof WebSocketFrameListener),
|
(listener instanceof WebSocketFrameListener),
|
||||||
(listener instanceof WebSocketPingPongListener),
|
(listener instanceof WebSocketPingPongListener),
|
||||||
|
@ -215,12 +216,13 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onTextFrame({}, {}) - webSocketListener:{}, webSocketPartialListener:{}, listener:{}",
|
LOG.debug("onTextFrame({}, {}) - webSocketListener={}, webSocketPartialListener={}, listener={}, activeMessage={}",
|
||||||
BufferUtil.toDetailString(buffer),
|
BufferUtil.toDetailString(buffer),
|
||||||
fin,
|
fin,
|
||||||
(listener instanceof WebSocketListener),
|
(listener instanceof WebSocketListener),
|
||||||
(listener instanceof WebSocketPartialListener),
|
(listener instanceof WebSocketPartialListener),
|
||||||
listener.getClass().getName());
|
listener.getClass().getName(),
|
||||||
|
activeMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listener instanceof WebSocketListener)
|
if (listener instanceof WebSocketListener)
|
||||||
|
@ -282,12 +284,9 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
String msgDetail = message == null
|
LOG.debug("onTextMessage([{}] \"{}\") - webSocketListener={}, listener={}",
|
||||||
? "<null>"
|
message.length(),
|
||||||
: String.format("[%d] \"%s\"", message.length(), TextUtil.maxStringLength(60, message));
|
TextUtil.maxStringLength(60, message),
|
||||||
|
|
||||||
LOG.debug("onTextMessage({}) - webSocketListener:{} listener:{}",
|
|
||||||
msgDetail,
|
|
||||||
(listener instanceof WebSocketListener),
|
(listener instanceof WebSocketListener),
|
||||||
listener.getClass().getName());
|
listener.getClass().getName());
|
||||||
}
|
}
|
||||||
|
@ -302,11 +301,12 @@ public class JettyListenerEventDriver extends AbstractEventDriver
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("onContinuationFrame({}, {}) - webSocketListener:{}, webSocketPartialListener:{}, listener:{}",
|
LOG.debug("onContinuationFrame({}, {}) - webSocketListener={}, webSocketPartialListener={}, listener={}, activeMessage={}",
|
||||||
BufferUtil.toDetailString(buffer), fin,
|
BufferUtil.toDetailString(buffer), fin,
|
||||||
(listener instanceof WebSocketListener),
|
(listener instanceof WebSocketListener),
|
||||||
(listener instanceof WebSocketPartialListener),
|
(listener instanceof WebSocketPartialListener),
|
||||||
listener.getClass().getName());
|
listener.getClass().getName(),
|
||||||
|
activeMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listener instanceof WebSocketPartialListener)
|
if (listener instanceof WebSocketPartialListener)
|
||||||
|
|
Loading…
Reference in New Issue