Skip to content

Commit 3dfedae

Browse files
committed
changed to default calculation mode for time stamps, make low level
debugs lambdas to improve efficiency is not logging at that level
1 parent 0964079 commit 3dfedae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

IoTDemoProxyGateway/src/main/java/com/oracle/demo/timg/iot/iotproxygateway/homeassistantentities/HomeAssistantMonitoredEntitySet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class HomeAssistantMonitoredEntitySet implements Runnable {
8080
private Duration retrievalrate = Duration.ofSeconds(10);
8181
private String devicekey;
8282
private String endpoint;
83-
private TimestampMode timestampMode = TimestampMode.EARLIEST;
83+
private TimestampMode timestampMode = TimestampMode.LATEST;
8484
private List<HomeAssistantMonitoredEntity> monitoredentities;
8585
@ToString.Exclude
8686
@Inject
@@ -198,7 +198,7 @@ private ZonedDateTime processEntity(Map<String, Object> payload, HomeAssistantMo
198198
gatewayStats.trackFailedHARetrieveCall();
199199
return null;
200200
}
201-
log.finer("Returned state string is :" + stateString);
201+
log.finer(() -> "Returned state string is :" + stateString);
202202
HomeAssistantState state;
203203
try {
204204
state = mapper.readValue(stateString, HomeAssistantState.class);
@@ -207,7 +207,7 @@ private ZonedDateTime processEntity(Map<String, Object> payload, HomeAssistantMo
207207
gatewayStats.trackFailedHARetrieveCall();
208208
return null;
209209
}
210-
log.fine("Extracted state is " + state);
210+
log.fine(() -> "Extracted state is " + state);
211211
gatewayStats.trackSucessfullHARetrieveCall();
212212
// make sure that we have the relevant times, even if we don't use them here
213213
// they may be needed on another pass through

0 commit comments

Comments
 (0)