Problem
When developing with AI agents (like Vulcan), there's no structured way to:
- Capture development session logs for later review
- Stream logs in real-time to another AI agent for live debugging
- Search/query past development sessions
Solution
Extend ~/.koad-io/packages/core/server/logger.js to write a parallel log file when in development mode.
Implementation Sketch
// In logger.js, add development-mode file logging
const isDev = !Meteor.isProduction && process.env.KOAD_DEV_LOGS === 'true';
if (isDev) {
const fs = Npm.require('fs');
const path = Npm.require('path');
const logFile = path.join(process.cwd(), `dev-session-${Date.now()}.log`);
// Wrap logger methods to also write to file
const originalInfo = logger.info.bind(logger);
logger.info = function(...args) {
originalInfo(...args);
fs.appendFileSync(logFile, `[\${new Date().toISOString()}] INFO: \${args.join(' ')}\n`);
};
// ... same for warn, error, debug
}
Features This Enables
| Feature |
Use Case |
| Session replay |
Review what happened in a dev session |
| Live streaming |
tail -f dev-session-*.log in another terminal for real-time debugging |
| Pattern detection |
Search logs across sessions for recurring issues |
| Agent memory |
Feed logs to playback-machine for context on past issues |
Simple Env Toggle
KOAD_DEV_LOGS=true enables it, off by default.
Problem
When developing with AI agents (like Vulcan), there's no structured way to:
Solution
Extend
~/.koad-io/packages/core/server/logger.jsto write a parallel log file when in development mode.Implementation Sketch
Features This Enables
tail -f dev-session-*.login another terminal for real-time debuggingSimple Env Toggle
KOAD_DEV_LOGS=trueenables it, off by default.