From e61de83fb90d7c4c6be1f9725d9dbd50f53566b2 Mon Sep 17 00:00:00 2001 From: Hans Hjort Date: Thu, 5 Sep 2019 13:35:25 -0400 Subject: [PATCH] Log the config after we are finished processing it --- config/config.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index e5d11ec636a..eca0350df0d 100644 --- a/config/config.go +++ b/config/config.go @@ -388,11 +388,6 @@ func New(v *viper.Viper) (*Configuration, error) { return nil, fmt.Errorf("viper failed to unmarshal app config: %v", err) } c.setDerivedDefaults() - glog.Info("Logging the resolved configuration:") - logGeneral(reflect.ValueOf(c), " \t") - if errs := c.validate(); len(errs) > 0 { - return &c, errs - } // To look for a request's publisher_id into the NonStandardPublishers in // O(1) time, we fill this hash table located in the NonStandardPublisherMap field of GDPR @@ -414,6 +409,13 @@ func New(v *viper.Viper) (*Configuration, error) { for i := 0; i < len(c.BlacklistedAccts); i++ { c.BlacklistedAcctMap[c.BlacklistedAccts[i]] = true } + + glog.Info("Logging the resolved configuration:") + logGeneral(reflect.ValueOf(c), " \t") + if errs := c.validate(); len(errs) > 0 { + return &c, errs + } + return &c, nil }