Added isXXXEnabled for logging statements
Guarded the logging statements which do concatenation of strings or calling toString on objects. When a log level isn't enabled this still would produce garbage that would need to be collected. Guarded all logging up to info, warn and error can be assumed to be enabled on a production system.
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
abc937dec2
commit
ff3c7c1e58
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2019 the original author or authors.
|
||||
* Copyright 2006-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -193,7 +193,9 @@ public class ChunkMessageChannelItemWriter<T> extends StepExecutionListenerSuppo
|
||||
int count = 0;
|
||||
int maxCount = maxWaitTimeouts;
|
||||
Throwable failure = null;
|
||||
logger.info("Waiting for " + localState.getExpecting() + " results");
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Waiting for " + localState.getExpecting() + " results");
|
||||
}
|
||||
while (localState.getExpecting() > 0 && count++ < maxCount) {
|
||||
try {
|
||||
getNextResult();
|
||||
|
||||
Reference in New Issue
Block a user