fix: redirect low-level logging functions to STDERR

This commit is contained in:
2026-07-06 01:32:02 +00:00
parent e0f2026a2f
commit 98c42ca7c1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
}
+2 -2
View File
@@ -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
}