Skip to content

Commit

Permalink
Fix bugs from logging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yorinasub17 committed Feb 2, 2021
1 parent e26e5c2 commit bc4eba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cli/cli_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func checkDeprecated(command string, terragruntOptions *options.TerragruntOption
deprecationHandler, deprecated := deprecatedCommands[command]
if deprecated {
newOptions, newCommand, newCommandFriendly := deprecationHandler(terragruntOptions)
util.GlobalFallbackLogEntry.Warnf(
terragruntOptions.Logger.Warnf(
"'%s' is deprecated. Running '%s' instead. Please update your workflows to use '%s', as '%s' may be removed in the future!\n",
command,
newCommandFriendly,
Expand Down Expand Up @@ -352,8 +352,10 @@ func RunTerragrunt(terragruntOptions *options.TerragruntOptions) error {
}

if terragruntConfig.Skip {
terragruntOptions.Logger.Infof("Skipping terragrunt module %s due to skip = true.",
terragruntOptions.TerragruntConfigPath)
terragruntOptions.Logger.Infof(
"Skipping terragrunt module %s due to skip = true.",
terragruntOptions.TerragruntConfigPath,
)
return nil
}

Expand Down Expand Up @@ -917,7 +919,7 @@ func runAll(terragruntOptions *options.TerragruntOptions) error {
return err
}

terragruntOptions.Logger.Printf("%s", stack.String())
terragruntOptions.Logger.Infof("%s", stack.String())

var prompt string
switch terragruntOptions.TerraformCommand {
Expand Down
1 change: 1 addition & 0 deletions options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ func (terragruntOptions *TerragruntOptions) Clone(terragruntConfigPath string) *
TerraformCliArgs: util.CloneStringList(terragruntOptions.TerraformCliArgs),
WorkingDir: workingDir,
Logger: util.CreateLogEntryWithWriter(terragruntOptions.ErrWriter, workingDir, terragruntOptions.LogLevel),
LogLevel: terragruntOptions.LogLevel,
Env: util.CloneStringMap(terragruntOptions.Env),
Source: terragruntOptions.Source,
SourceUpdate: terragruntOptions.SourceUpdate,
Expand Down

0 comments on commit bc4eba9

Please sign in to comment.