UNPKG

maildev

Version:

SMTP Server and Web Interface for reading and testing emails during development

67 lines 1.59 kB
/** * MailDev CLI Logger * * Logging utility that respects verbose/silent configuration */ export type LogLevel = 'debug' | 'info' | 'warn' | 'error'; export interface LoggerOptions { verbose?: boolean; silent?: boolean; } /** * CLI Logger class */ export declare class Logger { private verbose; private silent; constructor(options?: LoggerOptions); /** * Update logger options */ configure(options: LoggerOptions): void; /** * Log debug message (only in verbose mode) */ debug(message: string, ...args: unknown[]): void; /** * Log info message */ info(message: string, ...args: unknown[]): void; /** * Log success message */ success(message: string, ...args: unknown[]): void; /** * Log warning message */ warn(message: string, ...args: unknown[]): void; /** * Log error message (always shown unless silent) */ error(message: string, ...args: unknown[]): void; /** * Log server startup banner */ banner(lines: string[]): void; /** * Log a key-value pair */ keyValue(key: string, value: string): void; /** * Log incoming email */ email(from: string, to: string, subject: string): void; /** * Log email contents (JSON) if enabled */ emailContents(email: unknown): void; } /** * Global logger instance */ export declare const logger: Logger; /** * Create a new logger instance */ export declare function createLogger(options?: LoggerOptions): Logger; //# sourceMappingURL=logger.d.ts.map