UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

72 lines (71 loc) 2.18 kB
/** * @fileoverview Centralized logging system for the AI Code Review tool. * * This module provides a standardized logging interface with support for * different log levels, colored output, and log level control via environment * variables. It's designed to be used throughout the codebase to ensure * consistent logging behavior. */ export declare enum LogLevel { DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3, NONE = 4 } /** * Set the current log level * @param level The log level to set */ export declare function setLogLevel(level: LogLevel | string): void; /** * Get the current log level * @returns The current log level */ export declare function getLogLevel(): LogLevel; /** * Log a debug message * @param message The message to log * @param args Additional arguments to log */ export declare function debug(message: string, ...args: any[]): void; /** * Log an info message * @param message The message to log * @param args Additional arguments to log */ export declare function info(message: string, ...args: any[]): void; /** * Log a warning message * @param message The message to log * @param args Additional arguments to log */ export declare function warn(message: string, ...args: any[]): void; /** * Log an error message * @param message The message to log * @param args Additional arguments to log */ export declare function error(message: string, ...args: any[]): void; /** * Create a logger instance with a specific prefix * @param prefix The prefix to add to all log messages * @returns An object with debug, info, warn, and error methods */ export declare function createLogger(prefix: string): { debug: (message: string, ...args: any[]) => void; info: (message: string, ...args: any[]) => void; warn: (message: string, ...args: any[]) => void; error: (message: string, ...args: any[]) => void; }; declare const _default: { debug: typeof debug; info: typeof info; warn: typeof warn; error: typeof error; setLogLevel: typeof setLogLevel; getLogLevel: typeof getLogLevel; createLogger: typeof createLogger; LogLevel: typeof LogLevel; }; export default _default;