From 147abc5c6b8010e35b6e3a81ceba7f61f7a20e07 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 30 Aug 2020 13:38:38 -0400 Subject: [PATCH] feat: add LogDebug --- plugins/common/log.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/common/log.go b/plugins/common/log.go index 75a1689ab..a1715999c 100644 --- a/plugins/common/log.go +++ b/plugins/common/log.go @@ -100,3 +100,10 @@ func LogExclaim(text string) { func LogStderr(text string) { fmt.Fprintln(os.Stderr, text) } + +// LogDebug is the debug log formatter +func LogDebug(text string) { + if os.Getenv("DOKKU_TRACE") == "" { + fmt.Fprintln(os.Stderr, fmt.Sprintf(" ? %s", text)) + } +}