From d39f4ce54d03a1f56363ff5c33fd84a3e3788b95 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 8 Feb 2020 15:56:45 -0500 Subject: [PATCH] feat: add stderr log functions --- plugins/common/functions | 5 +++++ plugins/common/log.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/plugins/common/functions b/plugins/common/functions index 2cb56ca93..8b7a254ff 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -150,6 +150,11 @@ dokku_log_fail() { exit 1 } +dokku_log_stderr() { + declare desc="log stderr formatter" + echo "$@" 1>&2 +} + dokku_log_event() { declare desc="log dokku events" logger -t dokku-event -i -- "$@" diff --git a/plugins/common/log.go b/plugins/common/log.go index 68f130ba0..e60e912c4 100644 --- a/plugins/common/log.go +++ b/plugins/common/log.go @@ -54,3 +54,8 @@ func LogVerboseQuiet(text string) { func LogWarn(text string) { fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", text)) } + +// LogStderr is the stderr log formatter +func LogStderr(text string) { + fmt.Fprintln(os.Stderr, text) +}