Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
warn when ignoring a configuration file
Browse files Browse the repository at this point in the history
It's not that obvious that we ignore the entire file when there is
something wrong with it.
  • Loading branch information
Nicolas Martyanoff committed Jan 31, 2017
1 parent 87b5989 commit 446fb5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func main() {
legacyConf, err := config.NewIfExists(opts.configFile)
if err != nil {
log.Errorf("%s: %v", opts.configFile, err)
log.Warnf("ignoring %s", opts.configFile)
}
if legacyConf != nil {
log.Infof("using legacy configuration from %s", opts.configFile)
Expand All @@ -141,6 +142,7 @@ func main() {
conf, err := config.NewIfExists(opts.ddConfigFile)
if err != nil {
log.Errorf("%s: %v", opts.ddConfigFile, err)
log.Warnf("ignoring %s", opts.ddConfigFile)
}
if conf != nil {
log.Infof("using configuration from %s", opts.ddConfigFile)
Expand Down

0 comments on commit 446fb5a

Please sign in to comment.