Skip to content

Commit

Permalink
chore: log config init errors using exposed methods (#4541)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvrach committed Apr 12, 2024
1 parent a9e94b1 commit ac14cdb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions runner/runner.go
Expand Up @@ -100,6 +100,19 @@ func (r *Runner) Run(ctx context.Context, args []string) int {
return 1
}

path, err := config.Default.ConfigFileUsed()
if err != nil {
r.logger.Warnf("Config: Failed to parse config file from path %q, using default values: %v", path, err)
} else {
r.logger.Infof("Config: Using config file: %s", path)
}

if err := config.Default.DotEnvLoaded(); err != nil {
r.logger.Infof("Config: No .env file loaded: %v", err)
} else {
r.logger.Infof("Config: Loaded .env file")
}

// TODO: remove as soon as we update the configuration with statsExcludedTags where necessary
if !config.IsSet("statsExcludedTags") && deploymentType == deployment.MultiTenantType &&
(!config.IsSet("WORKSPACE_NAMESPACE") || strings.Contains(config.GetString("WORKSPACE_NAMESPACE", ""), "free")) {
Expand Down

0 comments on commit ac14cdb

Please sign in to comment.