fix: redirect low-level logging functions to STDERR

This commit is contained in:
2026-07-06 01:32:02 +00:00
parent 82188e8731
commit 1cb0fb2a07
2 changed files with 4 additions and 4 deletions
+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
}