Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Log the config after we are finished processing it (prebid#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhjort authored Sep 5, 2019
1 parent 90f46c1 commit 630e905
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit 630e905

Please sign in to comment.