From 7f1fe3ccfd8521539386f7d7d67f65935fae5e32 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 12 Mar 2019 12:34:45 -0400 Subject: [PATCH] chore: follow logging pattern from heroku for phase command declarations --- plugins/app-json/internal-functions | 2 +- plugins/common/functions | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/app-json/internal-functions b/plugins/app-json/internal-functions index d4750b4ad..37599fbf0 100755 --- a/plugins/app-json/internal-functions +++ b/plugins/app-json/internal-functions @@ -47,7 +47,7 @@ execute_script() { return fi - dokku_log_info1 "Running '$SCRIPT_CMD' in app container" + dokku_log_exclaim "${PHASE_SCRIPT_KEY^} command declared: '$SCRIPT_CMD'" local COMMAND COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; " COMMAND+=" if [[ -d '/app' ]]; then " diff --git a/plugins/common/functions b/plugins/common/functions index 72d0a95ec..749ed0cc1 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -96,6 +96,18 @@ dokku_log_verbose() { echo " $*" } +dokku_log_exclaim_quiet() { + declare desc="log exclaim formatter" + if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then + echo " ! $*" + fi +} + +dokku_log_exclaim() { + declare desc="log exclaim formatter" + echo " ! $*" +} + dokku_log_warn_quiet() { declare desc="log warning formatter" if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then