HookMITv1.0.0awesome-copilotruns code

Session Logger

Logs all Copilot coding agent session activity for audit and analysis

At a glance

Kind
Hook · Ananke tool
Reference
awesome-copilot/session-logger · ananke://tool/awesome-copilot/session-logger@1.0.0
Files
5 · 3.8 KB
How it's used
Hooks run their command automatically when the listed session events fire. Review the script before enabling it.

Where it fits

Task
Analyse data
Lifecycle phase
Verification
Role
Developer
Platform
Ananke PlexusGitHub Copilot
Needs
POSIX shell

Facets suggested from the item's own text and tags, not yet reviewed. Facets say where an item is relevant, not that it will run in your setup. How facets work

Checked by Dex

Verified, not self-reported: dex-trove 0.3.16 installed this item into each layout and checked that the tool can load it. Dex collects no download or usage data.

  • GitHub Copilot ✓ loads

Upstream metadata

Self-reported by the item's author; Dex shows it as written.

tagslogging, audit, analytics

Hook events

EventCommandTimeout
sessionStart.github/hooks/session-logger/log-session-start.sh5s
sessionEnd.github/hooks/session-logger/log-session-end.sh5s
userPromptSubmitted.github/hooks/session-logger/log-prompt.sh5s

Documentation

View upstream ↗
Contents

Comprehensive logging for GitHub Copilot coding agent sessions, tracking session starts, ends, and user prompts for audit trails and usage analytics.

Overview

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

Features

  • 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

Installation

  1. Copy this hook folder to your repository’s .github/hooks/ directory:

    cp -r hooks/session-logger .github/hooks/
  2. Create the logs directory:

    mkdir -p logs/copilot
  3. Ensure scripts are executable:

    chmod +x .github/hooks/session-logger/*.sh
  4. Commit the hook configuration to your repository’s default branch

Log Format

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"}

Privacy & Security

  • Add logs/ to .gitignore to avoid committing session data
  • Use LOG_LEVEL=ERROR to only log errors
  • Set SKIP_LOGGING=true environment variable to disable
  • Logs are stored locally only