@mikro-orm/core
Version:
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.
34 lines (33 loc) • 1.07 kB
TypeScript
import type { Logger, LoggerNamespace, LogContext, LoggerOptions } from './Logger';
export declare class DefaultLogger implements Logger {
private readonly options;
debugMode: boolean | LoggerNamespace[];
readonly writer: (message: string) => void;
private readonly usesReplicas?;
private readonly highlighter?;
constructor(options: LoggerOptions);
/**
* @inheritDoc
*/
log(namespace: LoggerNamespace, message: string, context?: LogContext): void;
/**
* @inheritDoc
*/
error(namespace: LoggerNamespace, message: string, context?: LogContext): void;
/**
* @inheritDoc
*/
warn(namespace: LoggerNamespace, message: string, context?: LogContext): void;
/**
* @inheritDoc
*/
setDebugMode(debugMode: boolean | LoggerNamespace[]): void;
isEnabled(namespace: LoggerNamespace, context?: LogContext): boolean;
/**
* @inheritDoc
*/
logQuery(context: {
query: string;
} & LogContext): void;
static create(options: LoggerOptions): DefaultLogger;
}