Class LogUtil
- java.lang.Object
-
- org.wso2.carbon.websocket.transport.utils.LogUtil
-
public class LogUtil extends Object
This class will be used log the websocket communication related requests/frames between gateway and backend.
-
-
Constructor Summary
Constructors Constructor Description LogUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
printHeaders(org.apache.commons.logging.Log log, io.netty.handler.codec.http.FullHttpResponse msg, io.netty.channel.ChannelHandlerContext ctx)
Print the headers associated with the initial Http Response.static void
printSpecificLog(org.apache.commons.logging.Log log, io.netty.channel.ChannelHandlerContext ctx, String message)
Print specific debug logs with theChannelHandlerContext
context.static void
printWebSocketFrame(org.apache.commons.logging.Log log, io.netty.handler.codec.http.websocketx.WebSocketFrame frame, io.netty.channel.ChannelHandlerContext ctx, boolean isInbound, String correlationID)
PrintWebSocketFrame
information.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, String correlationID)
PrintWebSocketFrame
information.
-
-
-
Method Detail
-
printHeaders
public static void printHeaders(org.apache.commons.logging.Log log, io.netty.handler.codec.http.FullHttpResponse msg, io.netty.channel.ChannelHandlerContext ctx)
Print the headers associated with the initial Http Response. The header details will be printed in the following format." >> Headers [channelContextId] [header name] : [header value]"
- Parameters:
log
-Log
object of the relevant classmsg
-FullHttpResponse
response from the backendctx
-ChannelHandlerContext
context
-
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, String correlationID)
PrintWebSocketFrame
information.- Parameters:
log
-Log
object of the relevant classframe
-WebSocketFrame
framectx
-ChannelHandlerContext
contextcustomMsg
- 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, String correlationID)
PrintWebSocketFrame
information.- Parameters:
log
-Log
object of the relevant classframe
-WebSocketFrame
framectx
-ChannelHandlerContext
contextisInbound
- 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 theChannelHandlerContext
context.- Parameters:
log
- logLog
object of the relevant classctx
-ChannelHandlerContext
contextmessage
- Log message
-
-