Shilun Fan created RATIS-2412:
---------------------------------
Summary: NettyClient LoggingHandler not working
Key: RATIS-2412
URL: https://issues.apache.org/jira/browse/RATIS-2412
Project: Ratis
Issue Type: Bug
Components: Netty
Reporter: Shilun Fan
Assignee: Shilun Fan
In `NettyClient.connect()` method, `Bootstrap.handler()` is called twice
consecutively, which causes the `LoggingHandler` to be overridden and not take
effect.
We can confirm this by looking at the Netty source code.
```
public B handler(ChannelHandler handler) {
this.handler = ObjectUtil.checkNotNull(handler, "handler");
return self();
}
```
Bootstrap has only one handler field internally. Every time we call the
`handler()` method, it directly `overwrites` the previously set value instead
of `accumulating / adding` to it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)