Skip to content

Commit

Permalink
Adding transactionId to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Apr 19, 2024
1 parent 6fbb755 commit 2b92ca5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ private void queryAllRegistries() {
List<String> active = discoveryEvent.registries.entrySet().stream()
.filter(entry -> entry.getValue().last_event_time != null).map(Entry::getKey).toList();

debug("Project has %d registries (%d active)", registries.size(), active.size());
debug("Project has %d registries (%d active) %s", registries.size(), active.size(),
envelope.transactionId);

ifTrueThen(shouldTraverseRegistries(), () -> active.forEach(this::issueModifiedRegistry));
}
Expand All @@ -125,7 +126,7 @@ private void queryDeviceDetails() {
discoveryEvent.cloud_model = iotAccess.fetchDevice(deviceRegistryId, deviceId);
discoveryEvent.cloud_model.operation = null;

debug("Detailed device %s/%s", deviceRegistryId, deviceId);
debug("Detailed device %s/%s %s", deviceRegistryId, deviceId, envelope.transactionId);

publish(discoveryEvent);
}
Expand All @@ -146,8 +147,8 @@ private void queryRegistryDevices() {
List<String> active = discoveryEvent.devices.entrySet().stream()
.filter(entry -> !isTrue(entry.getValue().blocked)).map(Entry::getKey).toList();

debug("Listed registry %s with %d devices (%d active)", deviceRegistryId,
discoveryEvent.devices.size(), active.size());
debug("Listed registry %s with %d devices (%d active) %s", deviceRegistryId,
discoveryEvent.devices.size(), active.size(), envelope.transactionId);

ifTrueThen(shouldDetailEntries(), () -> active.forEach(this::issueModifiedDevice));
}
Expand Down

0 comments on commit 2b92ca5

Please sign in to comment.