Roo-Code/src/utils/logging/index.ts
Chris Estreich 62c3914034
Farewell jest (#4607)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-16 21:39:45 -07:00

25 lines
640 B
TypeScript

/**
* @fileoverview Main entry point for the compact logging system
* Provides a default logger instance with Jest environment detection
*/
import { CompactLogger } from "./CompactLogger"
/**
* No-operation logger implementation for production environments
*/
const noopLogger = {
debug: () => {},
info: () => {},
warn: () => {},
error: () => {},
fatal: () => {},
child: () => noopLogger,
close: () => {},
}
/**
* Default logger instance
* Uses CompactLogger for normal operation, switches to noop logger in Jest test environment
*/
export const logger = process.env.NODE_ENV === "test" ? new CompactLogger() : noopLogger