From 98c42ca7c1c9d21cf1bd895a0995ef06b6abfffc Mon Sep 17 00:00:00 2001 From: ruihan Date: Mon, 6 Jul 2026 01:32:02 +0000 Subject: [PATCH] fix: redirect low-level logging functions to STDERR --- lib/colors.sh | 4 ++-- unleash-standalone.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/colors.sh b/lib/colors.sh index c08d231..54c27a2 100644 --- a/lib/colors.sh +++ b/lib/colors.sh @@ -32,7 +32,7 @@ log() { local ts ts=$(date '+%H:%M:%S') - echo -e "${color}[${label}]${NC} ${msg}" + echo -e "${color}[${label}]${NC} ${msg}" >&2 if [ -n "$LOG_FILE" ]; then echo "[${ts}] [${label}] ${msg}" >> "$LOG_FILE" 2>/dev/null || true @@ -40,7 +40,7 @@ log() { } error_exit() { - log "ERROR" "$1" >&2 + log "ERROR" "$1" exit 1 } diff --git a/unleash-standalone.sh b/unleash-standalone.sh index 347311c..1e0d4d8 100755 --- a/unleash-standalone.sh +++ b/unleash-standalone.sh @@ -35,7 +35,7 @@ log() { local ts ts=$(date '+%H:%M:%S') - echo -e "${color}[${label}]${NC} ${msg}" + echo -e "${color}[${label}]${NC} ${msg}" >&2 if [ -n "$LOG_FILE" ]; then echo "[${ts}] [${label}] ${msg}" >> "$LOG_FILE" 2>/dev/null || true @@ -43,7 +43,7 @@ log() { } error_exit() { - log "ERROR" "$1" >&2 + log "ERROR" "$1" exit 1 }