-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option for less verbose output (#1510)
* Option for less verbose output This moves majority of Terragrunt's output to DEBUG level, and sets default output mode to ERROR. The idea is that in default run user should see much less output. Closes: #432 * Updated after review Apart from small fixes, this: - adds deprecation check for command line arguments, and gives a warning if `--terragrunt-debug` is used; - imports `logrus` under its own name to avoid confusion; Related: #432 * Updates after review | 2 Main change - global LogEntry object introduced in `util/logger.go`. It helps us log properly when we didn't yet parse command line arguments * Fix tests for `cli/cli_app.go` P.S. Tests rock! * Rework global logger Global logger should be a fallback option, rather a way to go. So instead of using the same everywhere, we use global if no other logger is available (for example, if we have not yet parsed arguments). This change also addresses other PR review comments, like: - wrong documentation; - using `logrus.WarnLevel.String()` instead of hardcoded strings; - updated `isDeprecatedOption()`, with a more clear usage; * Fix typo in docs section * Apply `go fmt` properly * Apply `go fmt` properly | 2 * Fix `TestParseTerragruntOptionsFromArgs` test * Terragrunt should output all log to stderr * Set stderr as default output * Update TestApplySkipTrue() Add `--terragrunt-log-level info`, so that we could test it. * Fix tests This fixes tests that rely on double output of `run_shell`, as well as brings back `--terragrunt-debug`, but in slightly different form: to only generate `terragrunt-debug.tfvars.json` * Remove `--terragrunt-debug` from excluded and fix `\n` Terragrunt integration tests depend on newlines, and to ensure that logrus can properly print newlines with `\n` `DisableQuote: true` is needed [1]. In particular, this fixes `TestIncludeDirsDependencyConsistencyRegression` and `TestIncludeDirsStrict`. [1] - sirupsen/logrus#608 * Bring `--terragrunt-debug` tests back
- Loading branch information
Showing
31 changed files
with
281 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ vendor | |
.terragrunt-cache | ||
.bundle | ||
.ruby-version | ||
.terraform.lock.hcl | ||
.terraform.lock.hcl | ||
terragrunt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.