Skip to content

Commit

Permalink
0003655: Routing log messages can be excessively long
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichalek committed Aug 1, 2018
1 parent 96981e8 commit a49c1df
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -104,6 +104,8 @@
* @see IRouterService
*/
public class RouterService extends AbstractService implements IRouterService {

final int MAX_LOGGING_LENGTH = 512;

protected Map<String, Boolean> commonBatchesLastKnownState = new HashMap<String, Boolean>();

Expand Down Expand Up @@ -235,7 +237,6 @@ protected void insertInitialLoadEvents() {
processInfo.setStatus(ProcessInfo.Status.PROCESSING);

try {

INodeService nodeService = engine.getNodeService();
IDataService dataService = engine.getDataService();
ITriggerRouterService triggerRouterService = engine.getTriggerRouterService();
Expand Down Expand Up @@ -464,7 +465,7 @@ protected int routeDataForEachChannel() {
dataCount += routeDataForChannel(processInfo, nodeChannel, sourceNode);
} else {
gapDetector.setIsAllDataRead(false);
if (log.isDebugEnabled()) {
if (log.isDebugEnabled() && !nodeChannel.isEnabled()) {
log.debug(
"Not routing the {} channel. It is either disabled or suspended.",
nodeChannel.getChannelId());
Expand Down Expand Up @@ -906,7 +907,8 @@ protected int selectDataAndRoute(ProcessInfo processInfo, ChannelRouterContext c
+ "totalDataRoutedCount={}, totalDataEventCount={}, startDataId={}, endDataId={}, dataReadCount={}, peekAheadFillCount={}, transactions={}, dataGaps={}",
new Object[] { context.getChannel().getChannelId(), ((System.currentTimeMillis()-startTime) / 1000), totalDataCount, totalDataEventCount, context.getStartDataId(),
context.getEndDataId(), context.getDataReadCount(), context.getPeekAheadFillCount(),
context.getTransactions().toString(), context.getDataGaps().toString() });
StringUtils.abbreviate(context.getTransactions().toString(), MAX_LOGGING_LENGTH),
StringUtils.abbreviate(context.getDataGaps().toString(), MAX_LOGGING_LENGTH) });
ts = System.currentTimeMillis();
}

Expand Down

0 comments on commit a49c1df

Please sign in to comment.