| name | description | tags | |||
|---|---|---|---|---|---|
Session Logger |
Logs all Copilot coding agent session activity for audit and analysis |
|
Comprehensive logging for GitHub Copilot coding agent sessions, tracking session starts, ends, and user prompts for audit trails and usage analytics.
This hook provides detailed logging of Copilot coding agent activity:
- Session start/end times with working directory context
- User prompt submission events
- Configurable log levels
- Session Tracking: Log session start and end events
- Prompt Logging: Record when user prompts are submitted
- Structured Logging: JSON format for easy parsing
- Privacy Aware: Configurable to disable logging entirely
-
Copy this hook folder to your repository's
.github/hooks/directory:cp -r hooks/session-logger .github/hooks/
-
Create the logs directory:
mkdir -p logs/copilot
-
Ensure scripts are executable:
chmod +x .github/hooks/session-logger/*.sh -
Commit the hook configuration to your repository's default branch
Session events are written to logs/copilot/session.log and prompt events to logs/copilot/prompts.log in JSON format:
{"timestamp":"2024-01-15T10:30:00Z","event":"sessionStart","cwd":"/workspace/project"}
{"timestamp":"2024-01-15T10:35:00Z","event":"sessionEnd"}- Add
logs/to.gitignoreto avoid committing session data - Use
LOG_LEVEL=ERRORto only log errors - Set
SKIP_LOGGING=trueenvironment variable to disable - Logs are stored locally only