Skip to content

Commit

Permalink
Dropped log level on non-essential messages (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
climategadgets committed Oct 6, 2023
1 parent 4adb143 commit 0d889ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public void consumeSensorSignal(Signal<Double, String> signal) {

// Signals from different zones are coming, must keep them separate
zone2signal.put(signal.payload, signal);
logger.debug("signal: {}={}", signal.payload, signal);
logger.trace("consume/signal: {}={}", signal.payload, signal);
}

public void consumeMode(Signal<HvacMode, String> signal) {

// Signals from different units are coming, must keep them separate
logger.debug("Mode: {}={}", signal.payload, signal);
unit2mode.put(signal.payload, signal);
logger.trace("consume/mode: {}={}", signal.payload, signal);
}
}
4 changes: 2 additions & 2 deletions dz3r-model/src/main/java/net/sf/dz3r/model/Zone.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ public Flux<Signal<ZoneStatus, String>> compute(Flux<Signal<Double, String>> in)

// Now, need to translate into a form that is easier manipulated
var stage2 = stage1.map(this::translate)
.doOnNext(e -> logger.debug("compute {}/translated: {}", getAddress(), e));
.doOnNext(e -> logger.trace("compute {}/translated: {}", getAddress(), e));

// Now, dampen the signal if the zone is disabled
var stage3 = stage2
.map(this::suppressIfNotEnabled)
.doOnNext(e -> logger.debug("compute {}/isOn: {} {}", getAddress(), settings.enabled ? "enabled" : "DISABLED", e));
.doOnNext(e -> logger.trace("compute {}/isOn: {} {}", getAddress(), settings.enabled ? "enabled" : "DISABLED", e));

// And finally, suppress if the economizer says so
return stage3.map(this::suppressEconomizer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public SchedulePeriod match(SortedMap<SchedulePeriod, ZoneSettings> zoneSchedule

var stack = new ArrayDeque<SchedulePeriod>();

logger.debug("Matching {}", time);
logger.trace("matching {}", time);

SortedMap<SchedulePeriod, ZoneSettings> today = getToday(zoneSchedule, time.toLocalDate());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ private synchronized Flux<Map.Entry<String, Map.Entry<SchedulePeriod, ZoneSettin

var schedule = source.getValue();

logger.debug("{} schedule ({} entries)", zoneName, schedule.size());
logger.trace("{} schedule ({} entries)", zoneName, schedule.size());

Flux.fromIterable(schedule.keySet())
.subscribe(s -> logger.debug(" {}", s));
.subscribe(s -> logger.trace(" {}", s));

var now = LocalDateTime.now(clock);
var period = periodMatcher.match(schedule, now);
var currentPeriod = zone2period.get(zone);

logger.debug("{}: matched time={} period={}", zoneName, now, period);
logger.trace("{}: matched time={} period={}", zoneName, now, period);

if (same(currentPeriod, period)) {
logger.trace("{}: already at {}", zoneName, period);
Expand Down

0 comments on commit 0d889ff

Please sign in to comment.