From d8ad931488f6b942dabe28ecd6c399b4438da0a8 Mon Sep 17 00:00:00 2001 From: Unev Date: Tue, 29 Jun 2021 22:54:16 +0530 Subject: [PATCH] `ByteBufFormat ` constructor for LoggingHandler (#11420) __Motivation__ `LoggingHandler` misses a constructor variant that only takes `ByteBufFormat` __Modification__ Added the missing constructor variant. __Result__ `LoggingHandler` can be constructed with `ByteBufFormat` only. Co-authored-by: Nitesh Kant --- .../java/io/netty/handler/logging/LoggingHandler.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/handler/src/main/java/io/netty/handler/logging/LoggingHandler.java b/handler/src/main/java/io/netty/handler/logging/LoggingHandler.java index f39cdaa2cf..6b497d11d4 100644 --- a/handler/src/main/java/io/netty/handler/logging/LoggingHandler.java +++ b/handler/src/main/java/io/netty/handler/logging/LoggingHandler.java @@ -56,6 +56,15 @@ public class LoggingHandler extends ChannelDuplexHandler { public LoggingHandler() { this(DEFAULT_LEVEL); } + /** + * Creates a new instance whose logger name is the fully qualified class + * name of the instance. + * + * @param format Format of ByteBuf dumping + */ + public LoggingHandler(ByteBufFormat format) { + this(DEFAULT_LEVEL, format); + } /** * Creates a new instance whose logger name is the fully qualified class