Skip to content

Commit

Permalink
Merge pull request #716 from zalokhan/logPerformance
Browse files Browse the repository at this point in the history
guarding logging from evaluation
  • Loading branch information
no2chem committed Jun 15, 2017
2 parents e57ced7 + 6bba4f7 commit 336be2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {
} else {
if (validateEpoch(m, ctx)) {
// Route the message to the handler.
log.trace("Message routed to {}: {}", handler.getClass().getSimpleName(), msg);
if (log.isTraceEnabled()) {
log.trace("Message routed to {}: {}", handler.getClass().getSimpleName(), msg);
}
handlerWorkers.submit(() -> handler.handleMessage(m, ctx, this));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,9 @@ protected void channelRead0(ChannelHandlerContext ctx, CorfuMsg m) throws Except
} else {
if (validateEpochAndClientID(m, ctx)) {
// Route the message to the handler.
log.trace("Message routed to {}: {}", handler.getClass().getSimpleName(), m);
if (log.isTraceEnabled()) {
log.trace("Message routed to {}: {}", handler.getClass().getSimpleName(), m);
}
handler.handleMessage(m, ctx);
}
}
Expand Down

0 comments on commit 336be2f

Please sign in to comment.