Add logging around config load error to debug #69 (#72)

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/prologic/tube/pulls/72
This commit is contained in:
James Mills 2023-03-04 01:02:49 +00:00
parent bf1e25949d
commit ab40058ad7

View file

@ -49,7 +49,7 @@ func main() {
if flag.Lookup("config").Changed { if flag.Lookup("config").Changed {
log.Fatal(err) log.Fatal(err)
} }
log.Infof("Reading %s failed. Starting with builtin defaults.", config) log.WithError(err).Infof("Reading %s failed. Starting with builtin defaults.", config)
} }
// I'd like to add something like this here: log.Debug("Active config: %s", cfg.toJson()) // I'd like to add something like this here: log.Debug("Active config: %s", cfg.toJson())
a, err := app.NewApp(cfg) a, err := app.NewApp(cfg)