/** * Logger Consolidation Tests - RED Phase * * This test file documents duplicate logger implementations across the codebase * and defines the unified logger interface that should be implemented in the GREEN phase. * * Duplicate Logger Implementations Found: * * 1. packages/postgres.do/src/cdc/logger.ts: * - CDCLogger class with LogLevel enum (DEBUG=0, INFO=1, WARN=2, ERROR=3, SILENT=4) * - SubscriptionLogger for scoped logging * - LogEntry interface with level, levelName, message, timestamp, subscriptionId, context, error * - Circular buffer for event capture * - Console handler with color support * * 2. packages/postgres/src/storage/tiered-orchestrator.ts: * - Logger interface with debug, info, warn, error methods (string only) * - Simpler interface than CDCLogger * * 3. packages/postgres/src/routing/tenant-router.ts: * - TenantRouterLogger interface with log(entry), debug, info, warn, error methods * - LogLevel type ('debug' | 'info' | 'warn' | 'error') * - LogEntry interface with level, message, tenantId, correlationId, timestamp, data * * Differences in Implementations: * - CDCLogger uses numeric LogLevel enum; tenant-router uses string union type * - CDCLogger has event capture/circular buffer; others don't * - CDCLogger supports subscriptionId; tenant-router supports tenantId/correlationId * - TieredOrchestrator has simplest interface (just methods) * - Only CDCLogger has color support for console output * * Unified Logger Requirements: * - Support all log levels: debug, info, warn, error, (plus silent for filtering) * - Support structured logging with arbitrary metadata * - Support child loggers with scoped context (subscriptionId, tenantId, etc.) * - Support log filtering by level * - Support custom handlers/formatters * - Support event capture for debugging * - Cloudflare Workers compatible (no Node.js dependencies) */ export {}; //# sourceMappingURL=logger-consolidation.test.d.ts.map