UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.

42 lines (41 loc) 1.58 kB
import { LoggerOptions } from "./LoggerOptions"; import { QueryRunner } from "../query-runner/QueryRunner"; import { Logger } from "./Logger"; /** * Performs logging of the events in TypeORM. * This version of logger uses console to log events and does not use syntax highlighting. */ export declare class SimpleConsoleLogger implements Logger { private options?; constructor(options?: LoggerOptions | undefined); /** * Logs query and parameters used in it. */ logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner): void; /** * Logs query that is failed. */ logQueryError(error: string, query: string, parameters?: any[], queryRunner?: QueryRunner): void; /** * Logs query that is slow. */ logQuerySlow(time: number, query: string, parameters?: any[], queryRunner?: QueryRunner): void; /** * Logs events from the schema build process. */ logSchemaBuild(message: string, queryRunner?: QueryRunner): void; /** * Logs events from the migrations run process. */ logMigration(message: string, queryRunner?: QueryRunner): void; /** * Perform logging using given logger, or by default to the console. * Log has its own level and message. */ log(level: "log" | "info" | "warn", message: any, queryRunner?: QueryRunner): void; /** * Converts parameters to a string. * Sometimes parameters can have circular objects and therefor we are handle this case too. */ protected stringifyParams(parameters: any[]): string | any[]; }