fix: fix: standardize logging across all agents — capture errors, log exit codes, consistent format (#367)
This commit is contained in:
parent
f686d47a98
commit
91f971fe53
10 changed files with 116 additions and 53 deletions
|
|
@ -36,7 +36,7 @@ source "$FACTORY_ROOT/lib/guard.sh"
|
|||
# shellcheck source=../lib/agent-sdk.sh
|
||||
source "$FACTORY_ROOT/lib/agent-sdk.sh"
|
||||
|
||||
LOG_FILE="$SCRIPT_DIR/predictor.log"
|
||||
LOG_FILE="${DISINTO_LOG_DIR}/predictor/predictor.log"
|
||||
# shellcheck disable=SC2034 # consumed by agent-sdk.sh
|
||||
LOGFILE="$LOG_FILE"
|
||||
# shellcheck disable=SC2034 # consumed by agent-sdk.sh
|
||||
|
|
@ -44,7 +44,8 @@ SID_FILE="/tmp/predictor-session-${PROJECT_NAME}.sid"
|
|||
SCRATCH_FILE="/tmp/predictor-${PROJECT_NAME}-scratch.md"
|
||||
WORKTREE="/tmp/${PROJECT_NAME}-predictor-run"
|
||||
|
||||
log() { echo "[$(date -u +%Y-%m-%dT%H:%M:%S)Z] $*" >> "$LOG_FILE"; }
|
||||
# Override LOG_AGENT for consistent agent identification
|
||||
LOG_AGENT="predictor"
|
||||
|
||||
# ── Guards ────────────────────────────────────────────────────────────────
|
||||
check_active predictor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue