feat: trim any extra debug log prefixes

This commit is contained in:
Jose Diaz-Gonzalez
2021-01-02 06:11:51 -05:00
parent e8aaacff5e
commit 5e4c918d40

View File

@@ -110,7 +110,7 @@ func LogStderr(text string) {
// LogDebug is the debug log formatter
func LogDebug(text string) {
if os.Getenv("DOKKU_TRACE") == "" {
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ? %s", text))
if os.Getenv("DOKKU_TRACE") == "1" {
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ? %s", strings.TrimPrefix(text, " ? ")))
}
}