ruanwenjun commented on code in PR #12390:
URL: https://github.com/apache/dolphinscheduler/pull/12390#discussion_r997895787
##########
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java:
##########
@@ -187,9 +187,7 @@ public void userEventTriggered(ChannelHandlerContext ctx,
Object evt) throws Exc
heartBeat.setBody(heartBeatData);
ctx.channel().writeAndFlush(heartBeat)
.addListener(ChannelFutureListener.CLOSE_ON_FAILURE);
- if (logger.isDebugEnabled()) {
- logger.debug("Client send heart beat to: {}",
ChannelUtils.getRemoteAddress(ctx.channel()));
- }
+ logger.debug("Client send heart beat to: {}",
ChannelUtils.getRemoteAddress(ctx.channel()));
Review Comment:
In fact, I don't agree with remove `logger.isDebugEnabled` here, use
`logger.debug` will need to calculate
`ChannelUtils.getRemoteAddress(ctx.channel())` in each log, but in most of
times we don't open debug, we don't need to calculate this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]