Skip to content
Permalink
Browse files

0003865: Improve logging readability and appropriate levels

  • Loading branch information...
erilong committed Jan 30, 2019
1 parent 6b1454f commit 88a7ccf2ee7e06c2097344e0c6549bc0846fd68a
@@ -657,10 +657,13 @@ protected boolean producesCommonBatches(Channel channel, String nodeGroupId, Lis
}

if (!producesCommonBatches.equals(commonBatchesLastKnownState.get(channelId))) {
if (producesCommonBatches) {
log.info("The '{}' channel is in common batch mode", channelId);
String message = "The '{}' channel is " + (producesCommonBatches ? "" : "NOT ") + "in common batch mode";
if (channelId.equals(Constants.CHANNEL_CONFIG) || channelId.equals(Constants.CHANNEL_HEARTBEAT) ||
channelId.equals(Constants.CHANNEL_FILESYNC) || channelId.equals(Constants.CHANNEL_MONITOR) ||
channelId.equals(Constants.CHANNEL_FILESYNC_RELOAD) || channelId.equals(Constants.CHANNEL_RELOAD)) {
log.debug(message, channelId);
} else {
log.info("The '{}' channel is NOT in common batch mode", channelId);
log.info(message, channelId);
}
commonBatchesLastKnownState.put(channelId, producesCommonBatches);
}

0 comments on commit 88a7ccf

Please sign in to comment.
You can’t perform that action at this time.