Class DcpLoggingHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.logging.LoggingHandler
com.couchbase.client.dcp.transport.netty.DcpLoggingHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

@Sharable public class DcpLoggingHandler extends io.netty.handler.logging.LoggingHandler
A ChannelHandler that logs all events using a logging framework. By default, all events are logged at DEBUG level.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields inherited from class io.netty.handler.logging.LoggingHandler

    internalLevel, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance whose logger name is the fully qualified class name of the instance with hex dump enabled.
    DcpLoggingHandler(io.netty.handler.logging.LogLevel level)
    Creates a new instance whose logger name is the fully qualified class name of the instance.
    Creates a new instance with the specified logger name and with hex dump enabled.
    DcpLoggingHandler(Class<?> clazz, io.netty.handler.logging.LogLevel level)
    Creates a new instance with the specified logger name.
    Creates a new instance with the specified logger name.
    DcpLoggingHandler(String name, io.netty.handler.logging.LogLevel level)
    Creates a new instance with the specified logger name.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    format(io.netty.channel.ChannelHandlerContext ctx, String eventName, Object arg)
     

    Methods inherited from class io.netty.handler.logging.LoggingHandler

    bind, byteBufFormat, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, format, format, level, userEventTriggered, write

    Methods inherited from class io.netty.channel.ChannelDuplexHandler

    read

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Constructor Details

    • DcpLoggingHandler

      public DcpLoggingHandler()
      Creates a new instance whose logger name is the fully qualified class name of the instance with hex dump enabled.
    • DcpLoggingHandler

      public DcpLoggingHandler(io.netty.handler.logging.LogLevel level)
      Creates a new instance whose logger name is the fully qualified class name of the instance.
      Parameters:
      level - the log level
    • DcpLoggingHandler

      public DcpLoggingHandler(Class<?> clazz)
      Creates a new instance with the specified logger name and with hex dump enabled.
    • DcpLoggingHandler

      public DcpLoggingHandler(Class<?> clazz, io.netty.handler.logging.LogLevel level)
      Creates a new instance with the specified logger name.
      Parameters:
      level - the log level
    • DcpLoggingHandler

      public DcpLoggingHandler(String name)
      Creates a new instance with the specified logger name.
    • DcpLoggingHandler

      public DcpLoggingHandler(String name, io.netty.handler.logging.LogLevel level)
      Creates a new instance with the specified logger name.
      Parameters:
      level - the log level
  • Method Details

    • format

      protected String format(io.netty.channel.ChannelHandlerContext ctx, String eventName, Object arg)
      Overrides:
      format in class io.netty.handler.logging.LoggingHandler