Commit c500be4e286a58fa81491d40819ef84adf21977c

Authored by Andrii Shvaika
1 parent 40659a20

Improved logging of profile updates

@@ -210,7 +210,6 @@ public class DefaultTransportService implements TransportService { @@ -210,7 +210,6 @@ public class DefaultTransportService implements TransportService {
210 } 210 }
211 records.forEach(record -> { 211 records.forEach(record -> {
212 try { 212 try {
213 - log.info("[{}] SessionIdMSB, [{}] SessionIdLSB, records", record.getValue().getSessionIdMSB(), record.getValue().getSessionIdLSB());  
214 processToTransportMsg(record.getValue()); 213 processToTransportMsg(record.getValue());
215 } catch (Throwable e) { 214 } catch (Throwable e) {
216 log.warn("Failed to process the notification.", e); 215 log.warn("Failed to process the notification.", e);
@@ -771,6 +770,7 @@ public class DefaultTransportService implements TransportService { @@ -771,6 +770,7 @@ public class DefaultTransportService implements TransportService {
771 UUID sessionId = new UUID(toSessionMsg.getSessionIdMSB(), toSessionMsg.getSessionIdLSB()); 770 UUID sessionId = new UUID(toSessionMsg.getSessionIdMSB(), toSessionMsg.getSessionIdLSB());
772 SessionMetaData md = sessions.get(sessionId); 771 SessionMetaData md = sessions.get(sessionId);
773 if (md != null) { 772 if (md != null) {
  773 + log.trace("[{}] Processing notification: {}", sessionId, toSessionMsg);
774 SessionMsgListener listener = md.getListener(); 774 SessionMsgListener listener = md.getListener();
775 transportCallbackExecutor.submit(() -> { 775 transportCallbackExecutor.submit(() -> {
776 if (toSessionMsg.hasGetAttributesResponse()) { 776 if (toSessionMsg.hasGetAttributesResponse()) {
@@ -798,12 +798,14 @@ public class DefaultTransportService implements TransportService { @@ -798,12 +798,14 @@ public class DefaultTransportService implements TransportService {
798 deregisterSession(md.getSessionInfo()); 798 deregisterSession(md.getSessionInfo());
799 } 799 }
800 } else { 800 } else {
  801 + log.trace("Processing broadcast notification: {}", toSessionMsg);
801 if (toSessionMsg.hasEntityUpdateMsg()) { 802 if (toSessionMsg.hasEntityUpdateMsg()) {
802 TransportProtos.EntityUpdateMsg msg = toSessionMsg.getEntityUpdateMsg(); 803 TransportProtos.EntityUpdateMsg msg = toSessionMsg.getEntityUpdateMsg();
803 EntityType entityType = EntityType.valueOf(msg.getEntityType()); 804 EntityType entityType = EntityType.valueOf(msg.getEntityType());
804 if (EntityType.DEVICE_PROFILE.equals(entityType)) { 805 if (EntityType.DEVICE_PROFILE.equals(entityType)) {
805 DeviceProfile deviceProfile = deviceProfileCache.put(msg.getData()); 806 DeviceProfile deviceProfile = deviceProfileCache.put(msg.getData());
806 if (deviceProfile != null) { 807 if (deviceProfile != null) {
  808 + log.info("On device profile update: {}", deviceProfile);
807 onProfileUpdate(deviceProfile); 809 onProfileUpdate(deviceProfile);
808 } 810 }
809 } else if (EntityType.TENANT_PROFILE.equals(entityType)) { 811 } else if (EntityType.TENANT_PROFILE.equals(entityType)) {