Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the config after we are finished processing it #1022

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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