Change debug enabled check for performance optimization

pull/372/head
Pahansith Gunathilake 10 months ago
parent d97f459407
commit d57be2c00c

@ -208,8 +208,9 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
deviceDetailsWrapper.setEvents(payload); deviceDetailsWrapper.setEvents(payload);
Future<Integer> apiCallback = publishEvents(device, deviceDetailsWrapper, eventType); Future<Integer> apiCallback = publishEvents(device, deviceDetailsWrapper, eventType);
if (null != apiCallback) { if (null != apiCallback) {
boolean isDebugEnabled = log.isDebugEnabled();
while(!apiCallback.isDone()) { while(!apiCallback.isDone()) {
if (log.isDebugEnabled()) { if (isDebugEnabled) {
log.debug("Waiting for the response from the API for the reporting data " + log.debug("Waiting for the response from the API for the reporting data " +
"publishing for the device " + deviceId + ". Event payload: " + payload); "publishing for the device " + deviceId + ". Event payload: " + payload);
} }

Loading…
Cancel
Save