Slightly improve logging

This commit is contained in:
Thorben Günther 2023-02-21 14:00:21 +01:00
parent af7469d97b
commit cd848543b3
No known key found for this signature in database
GPG key ID: 415CD778D8C5AFED
2 changed files with 3 additions and 3 deletions

View file

@ -386,11 +386,11 @@ func main() {
cfg, err := readConfig(configPath) cfg, err := readConfig(configPath)
if err != nil { if err != nil {
logger.Fatalf("config: %v", err) logger.Fatalf("Failed to read config: %v", err)
} }
if err := logger.SetLevelFromString(cfg.LogLevel); err != nil { if err := logger.SetLevelFromString(cfg.LogLevel); err != nil {
logger.Errorf("config: %v", err) logger.Errorf("Failed to parse logging level: %v", err)
} }
client := &httpClient{&http.Client{Timeout: time.Second * 3}} client := &httpClient{&http.Client{Timeout: time.Second * 3}}

View file

@ -133,5 +133,5 @@ func (br *bridge) handleSilences(w http.ResponseWriter, r *http.Request) {
return return
} }
br.logger.Debugf("silences: created new silence %s", id.ID) br.logger.Infof("Created new silence %s", id.ID)
} }