Merge pull request #3848 from dokku/logging-fixes

Minor logging changes
This commit is contained in:
Jose Diaz-Gonzalez
2020-02-08 19:48:03 -05:00
committed by GitHub
4 changed files with 13 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ cmd-apps-report-single() {
if [[ "$use_echo" ]]; then
echo "not deployed"
else
dokku_log_exit "not deployed"
dokku_log_exit_quiet "not deployed"
fi
fi
else

View File

@@ -12,7 +12,7 @@ apps_exists_cmd() {
if ! apps_exists "$APP"; then
dokku_log_fail "App does not exist"
fi
dokku_log_info1 "App already exists"
dokku_log_info1 "App exists"
}
apps_exists_cmd "$@"

View File

@@ -130,9 +130,7 @@ dokku_log_exit_quiet() {
dokku_log_exit() {
declare desc="log exit formatter"
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
echo "$@" 1>&2
fi
echo "$@" 1>&2
exit 0
}
@@ -150,6 +148,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 -- "$@"

View File

@@ -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)
}