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
|
|
@ -35,7 +35,7 @@ source "$FACTORY_ROOT/lib/guard.sh"
|
|||
# shellcheck source=../lib/agent-sdk.sh
|
||||
source "$FACTORY_ROOT/lib/agent-sdk.sh"
|
||||
|
||||
LOG_FILE="$SCRIPT_DIR/planner.log"
|
||||
LOG_FILE="${DISINTO_LOG_DIR}/planner/planner.log"
|
||||
# shellcheck disable=SC2034 # consumed by agent-sdk.sh
|
||||
LOGFILE="$LOG_FILE"
|
||||
# shellcheck disable=SC2034 # consumed by agent-sdk.sh
|
||||
|
|
@ -43,7 +43,8 @@ SID_FILE="/tmp/planner-session-${PROJECT_NAME}.sid"
|
|||
SCRATCH_FILE="/tmp/planner-${PROJECT_NAME}-scratch.md"
|
||||
WORKTREE="/tmp/${PROJECT_NAME}-planner-run"
|
||||
|
||||
log() { echo "[$(date -u +%Y-%m-%dT%H:%M:%S)Z] $*" >> "$LOG_FILE"; }
|
||||
# Override LOG_AGENT for consistent agent identification
|
||||
LOG_AGENT="planner"
|
||||
|
||||
# ── Guards ────────────────────────────────────────────────────────────────
|
||||
check_active planner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue