/** * Logging utilities for the library. * * @packageDocumentation */ /** * Logger interface for logging information, debugging messages, and SQL queries. */ export interface Logger { /** * Logs the given message at the info level. * * @param message The message to be logged. */ info(message: any): void; /** * Logs the given message at the warn level. * * @param message The message to be logged. */ warn(message: any): void; /** * Logs the given message at the debug level. * * @param message The message to be logged. */ debug(message: any): void; /** * Logs the given SQL query. * * @param sql The SQL query to be logged. */ sql(sql: string): void; /** * Whether info logging is enabled. */ infoEnabled: boolean; /** * Whether debug logging is enabled. */ debugEnabled: boolean; } /** * Logs SQL statements and arguments using a logger. * * @param sql The SQL statement to log. * @param args The optional arguments to log. * @param logger The logger instance to use. */ export declare function logSql(sql: string, args: readonly unknown[], logger?: Logger): void; /** * Logs a batch of SQL statements and arguments using a logger. * * @param statements The SQL statements to log. * @param logger The logger instance to use. */ export declare function logBatch(statements: { sql: string; args: readonly unknown[]; }[], logger?: Logger): void; /** * A logger that logs to the console. */ export declare class ConsoleLogger implements Logger { readonly infoEnabled: boolean; readonly debugEnabled: boolean; constructor(infoEnabled?: boolean, debugEnabled?: boolean); info(message: any): void; warn(message: any): void; debug(message: any): void; sql(sql: string): void; } /** * A logger that logs to the console with pretty colors. */ export declare class PrettyConsoleLogger extends ConsoleLogger { info(message: any): void; sql(sql: string): void; } /** * A logger that does nothing. */ export declare class NullLogger implements Logger { readonly infoEnabled: boolean; readonly debugEnabled: boolean; static readonly INSTANCE: NullLogger; private constructor(); info(_: any): void; warn(_: any): void; debug(_: any): void; sql(_: string): void; }