feat: cleanup log output for failure case

Also mark DOKKU_DISABLE_ANSI_PREFIX_REMOVAL as deprecated (it will be removed in 0.23.0 and no prefixes will be removed at that time).
This commit is contained in:
Jose Diaz-Gonzalez
2020-11-28 03:32:11 -05:00
parent bd261e6847
commit bde77dbf78
4 changed files with 7 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ import (
// LogFail is the failure log formatter
// prints text to stderr and exits with status 1
func LogFail(text string) {
fmt.Fprintln(os.Stderr, fmt.Sprintf("FAILED: %s", text))
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", text))
os.Exit(1)
}
@@ -17,7 +17,7 @@ func LogFail(text string) {
// prints text to stderr and exits with status 1
func LogFailQuiet(text string) {
if os.Getenv("DOKKU_QUIET_OUTPUT") == "" {
fmt.Fprintln(os.Stderr, fmt.Sprintf("FAILED: %s", text))
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", text))
}
os.Exit(1)
}