chore: follow logging pattern from heroku for phase command declarations

This commit is contained in:
Jose Diaz-Gonzalez committed 2019-03-13 02:05:18 -04:00
1 parent 6797971016
commit 7f1fe3ccfd
2 files changed
+13 -1

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ execute_script() {
return return
fi fi
dokku_log_info1 "Running '$SCRIPT_CMD' in app container" dokku_log_exclaim "${PHASE_SCRIPT_KEY^} command declared: '$SCRIPT_CMD'"
local COMMAND local COMMAND
COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; " COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; "
COMMAND+=" if [[ -d '/app' ]]; then " COMMAND+=" if [[ -d '/app' ]]; then "
+12
View File
@@ -96,6 +96,18 @@ dokku_log_verbose() {
echo " $*" 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() { dokku_log_warn_quiet() {
declare desc="log warning formatter" declare desc="log warning formatter"
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then