Skip to content

Commit

Permalink
Merge branch 'fix/config-log' into cmd-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldeal committed Jan 25, 2018
2 parents 92a5ca8 + 6bb9633 commit 29dccac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package config
import (
"time"

"github.com/ONSdigital/go-ns/log"
"github.com/kelseyhightower/envconfig"
)

Expand Down Expand Up @@ -53,9 +52,5 @@ func Get() (*Configuration, error) {
},
}

sanitized := *cfg
sanitized.SecretKey = ""
log.Info("config on startup", log.Data{"config": sanitized})

return cfg, envconfig.Process("", cfg)
}
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func main() {
os.Exit(1)
}

sanitized := *cfg
sanitized.SecretKey = ""
log.Info("config on startup", log.Data{"config": sanitized})

generateDownloadsProducer, err := kafka.NewProducer(cfg.KafkaAddr, cfg.GenerateDownloadsTopic, 0)
if err != nil {
log.Error(errors.Wrap(err, "error creating kakfa producer"), nil)
Expand Down

0 comments on commit 29dccac

Please sign in to comment.