-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
The codebase has many `console.error('[DEBUG] ...')` statements for informational logging. Issues:
- Debug logs go to stderr - Informational messages should use stdout
- No log levels - Can't distinguish info/warn/error/debug
- Always enabled - No way to disable debug logging in production
- Inconsistent format - Some use [DEBUG], [ERROR], [WARN], some don't
Proposed Solution
Either:
Option 1: Simple - Environment Variable
const DEBUG = process.env.DEBUG === 'true';
function debug(msg: string, ...args: any[]) {
if (DEBUG) console.error('[DEBUG]', msg, ...args);
}
function info(msg: string, ...args: any[]) {
console.log('[INFO]', msg, ...args);
}Option 2: Structured Logger
Use a library like pino or winston for proper log levels, structured output, and configuration.
Benefits
- Cleaner production logs
- Configurable verbosity
- Better debugging experience
- Consistent log format
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request