UNPKG

@aradox/multi-orm

Version:

Type-safe ORM with multi-datasource support, row-level security, and Prisma-like API for PostgreSQL, SQL Server, and HTTP APIs

35 lines 1.35 kB
/** * Logging utility with environment-based log level control * * Set LOG_LEVEL environment variable to control verbosity: * - 'off' or undefined: No logging (default) * - 'error': Only errors * - 'warn': Warnings and errors * - 'info': Info, warnings, and errors * - 'debug': All logs including debug statements * * Set LOG_MODULES to filter by module (comma-separated): * - 'parser,stitcher,adapter' etc. * - Leave empty to log all modules * * Examples: * LOG_LEVEL=debug npm start * LOG_LEVEL=info LOG_MODULES=stitcher,adapter node dist/example.js */ export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug'; export type LogModule = 'parser' | 'stitcher' | 'adapter' | 'http' | 'mssql' | 'postgres' | 'mysql' | 'mongodb' | 'typegen' | 'cli' | 'runtime' | 'computed' | 'cache'; declare class Logger { private level; private modules; constructor(); private shouldLog; private formatMessage; debug(module: LogModule, message: string, ...args: any[]): void; info(module: LogModule, message: string, ...args: any[]): void; warn(module: LogModule, message: string, ...args: any[]): void; error(module: LogModule, message: string, ...args: any[]): void; log(message: string, ...args: any[]): void; } export declare const logger: Logger; export {}; //# sourceMappingURL=logger.d.ts.map