Class WebsocketLogUtil
java.lang.Object
org.wso2.carbon.inbound.endpoint.protocol.websocket.WebsocketLogUtil
This class will be used log the websocket communication related requests/frames between client and the gateway.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprintHeaders(org.apache.commons.logging.Log log, io.netty.handler.codec.http.FullHttpRequest msg, io.netty.channel.ChannelHandlerContext ctx) Print the headers associated with the initial Http Request.static voidprintSpecificLog(org.apache.commons.logging.Log log, io.netty.channel.ChannelHandlerContext ctx, String message) Print specific debug logs with theChannelHandlerContextcontext.static voidprintWebSocketFrame(org.apache.commons.logging.Log log, io.netty.handler.codec.http.websocketx.WebSocketFrame frame, io.netty.channel.ChannelHandlerContext ctx, boolean isInbound) PrintWebSocketFrameinformation.static voidprintWebSocketFrame(org.apache.commons.logging.Log log, io.netty.handler.codec.http.websocketx.WebSocketFrame frame, io.netty.channel.ChannelHandlerContext ctx, String customMsg, boolean isInbound) PrintWebSocketFrameinformation.
-
Constructor Details
-
WebsocketLogUtil
public WebsocketLogUtil()
-
-
Method Details
-
printHeaders
public static void printHeaders(org.apache.commons.logging.Log log, io.netty.handler.codec.http.FullHttpRequest msg, io.netty.channel.ChannelHandlerContext ctx) Print the headers associated with the initial Http Request. The header details will be printed in the following format." >> Headers [channelContextId] [header name] : [header value]"
- Parameters:
log-Logobject of the relevant classmsg-FullHttpRequestresponse from the backendctx-ChannelHandlerContextcontext
-
printWebSocketFrame
public static void printWebSocketFrame(org.apache.commons.logging.Log log, io.netty.handler.codec.http.websocketx.WebSocketFrame frame, io.netty.channel.ChannelHandlerContext ctx, String customMsg, boolean isInbound) PrintWebSocketFrameinformation.- Parameters:
log-Logobject of the relevant classframe-WebSocketFrameframectx-ChannelHandlerContextcontextcustomMsg- Custom message along with the frame informationisInbound- true if the frame is inbound, false if it is outbound
-
printWebSocketFrame
public static void printWebSocketFrame(org.apache.commons.logging.Log log, io.netty.handler.codec.http.websocketx.WebSocketFrame frame, io.netty.channel.ChannelHandlerContext ctx, boolean isInbound) PrintWebSocketFrameinformation.- Parameters:
log-Logobject of the relevant classframe-WebSocketFrameframectx-ChannelHandlerContextcontextisInbound- true if the frame is inbound, false if it is outbound
-
printSpecificLog
public static void printSpecificLog(org.apache.commons.logging.Log log, io.netty.channel.ChannelHandlerContext ctx, String message) Print specific debug logs with theChannelHandlerContextcontext.- Parameters:
log- logLogobject of the relevant classctx-ChannelHandlerContextcontextmessage- Log message
-