Skip to content

Commit

Permalink
Add log.isDebugEnabled() to reduce string allocation (#8743)
Browse files Browse the repository at this point in the history
Signed-off-by: Baoyi Chen <[email protected]>
  • Loading branch information
leonchen83 authored Oct 20, 2022
1 parent 481c801 commit 8404eb0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,15 @@ public boolean isRsv3User()

protected void nextIncomingFrame(Frame frame, Callback callback)
{
log.debug("nextIncomingFrame({})", frame);
if (log.isDebugEnabled())
log.debug("nextIncomingFrame({})", frame);
this.nextIncoming.onFrame(frame, callback);
}

protected void nextOutgoingFrame(Frame frame, Callback callback, boolean batch)
{
log.debug("nextOutgoingFrame({})", frame);
if (log.isDebugEnabled())
log.debug("nextOutgoingFrame({})", frame);
this.nextOutgoing.sendFrame(frame, callback, batch);
}

Expand Down

0 comments on commit 8404eb0

Please sign in to comment.