Commit 1bcb7bd9 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

feat: make myirmaserver print configuration at debug level during startup

parent 287fdbed
......@@ -2,6 +2,7 @@ package myirmaserver
import (
"context"
"encoding/json"
"net/http"
"strconv"
"time"
......@@ -61,6 +62,13 @@ func New(conf *Configuration) (*Server, error) {
s.scheduler.Every(10).Seconds().Do(s.store.flush)
s.schedulerStop = s.scheduler.Start()
if s.conf.LogJSON {
s.conf.Logger.WithField("configuration", s.conf).Debug("Configuration")
} else {
bts, _ := json.MarshalIndent(s.conf, "", " ")
s.conf.Logger.Debug("Configuration: ", string(bts), "\n")
}
return s, nil
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment