-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_logs
More file actions
executable file
·29 lines (27 loc) · 892 Bytes
/
view_logs
File metadata and controls
executable file
·29 lines (27 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# Real-time log viewer for cc-exp-runner
# Usage: ./view_logs [run_dir]
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ -n "$1" ]]; then
# View specific run directory logs
RUN_DIR="$1"
if [[ ! -d "$RUN_DIR" ]]; then
RUN_DIR="$ROOT/runs/$1"
fi
echo "Viewing logs for: $RUN_DIR"
echo "Press Ctrl+C to stop"
echo ""
tail -f "$RUN_DIR/artifacts/logs/"*.log 2>/dev/null || echo "No logs found in $RUN_DIR"
else
# View main listener log + latest run
echo "=== CC-EXP-RUNNER Log Viewer ==="
echo "Main log: $ROOT/logs/listener.log"
echo ""
echo "Recent runs:"
ls -lt "$ROOT/runs/"*/*/artifacts/logs/claude_output.log 2>/dev/null | head -5
echo ""
echo "Press Ctrl+C to stop"
echo "=========================================="
echo ""
tail -f "$ROOT/logs/listener.log" 2>/dev/null
fi