chore: reduce logging (#8880)

This commit is contained in:
andig 2023-07-09 12:13:09 +02:00 • committed by GitHub
parent 8d5676cadc
commit e82fb3f0e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View file

@ -145,22 +145,18 @@ func (site *Site) GetTariff(tariff string) api.Tariff {
switch {
case site.tariffs.Planner != nil:
// prio 0: manually set planner tariff
site.log.DEBUG.Printf("planner tariff")
return site.tariffs.Planner
case site.tariffs.Grid != nil && site.tariffs.Grid.Type() == api.TariffTypePriceDynamic:
// prio 1: dynamic grid tariff
site.log.DEBUG.Printf("dynamic grid tariff")
return site.tariffs.Grid
case site.tariffs.Co2 != nil:
// prio 2: co2 tariff
site.log.DEBUG.Printf("co2 tariff")
return site.tariffs.Co2
default:
// prio 3: static grid tariff
site.log.DEBUG.Printf("static grid tariff")
return site.tariffs.Grid
}

View file

@ -92,7 +92,7 @@ func Persist(log *util.Logger) {
// upload executes the actual upload.
// Lock must be held when calling upload.
func upload(log *util.Logger, chargePower, greenPower float64) error {
log.DEBUG.Printf("telemetry: charge: Δ%.0f/%.0fWh @ %.0fW", accGreenEnergy*1e3, accChargeEnergy*1e3, chargePower)
log.TRACE.Printf("telemetry: charge: Δ%.0f/%.0fWh @ %.0fW", accGreenEnergy*1e3, accChargeEnergy*1e3, chargePower)
data := InstanceChargeProgress{
InstanceID: instanceID,