Skip to content

Commit

Permalink
Add more details to invalid configuration log
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanwichmann committed Apr 21, 2019
1 parent 07413fa commit f8ae606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (configuration *Configuration) lightScheduleForDay(light int, date time.Tim
for _, candidate := range lightSchedule.BeforeSunrise {
timestamp, err := candidate.AsTimestamp(date)
if err != nil {
log.Warningf("⚙ Found invalid configuration entry: %+v (Error: %v)", candidate, err)
log.Warningf("⚙ Found invalid configuration entry before sunrise: %+v (Error: %v)", candidate, err)
continue
}
schedule.beforeSunrise = append(schedule.beforeSunrise, timestamp)
Expand All @@ -276,7 +276,7 @@ func (configuration *Configuration) lightScheduleForDay(light int, date time.Tim
for _, candidate := range lightSchedule.AfterSunset {
timestamp, err := candidate.AsTimestamp(date)
if err != nil {
log.Warningf("⚙ Found invalid configuration entry: %+v (Error: %v)", candidate, err)
log.Warningf("⚙ Found invalid configuration entry after sunset: %+v (Error: %v)", candidate, err)
continue
}
schedule.afterSunset = append(schedule.afterSunset, timestamp)
Expand Down

0 comments on commit f8ae606

Please sign in to comment.