Skip to main content
Module

x/typeorm/src/logger/Logger.ts>Logger

Forked from https://github.com/typeorm/typeorm
Latest
interface Logger
import { type Logger } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/logger/Logger.ts";

Performs logging of the events in TypeORM.

Methods

logQuery(
query: string,
parameters?: any[],
queryRunner?: QueryRunner,
): any

Logs query and parameters used in it.

logQueryError(
error: string,
query: string,
parameters?: any[],
queryRunner?: QueryRunner,
): any

Logs query that is failed.

logQuerySlow(
time: number,
query: string,
parameters?: any[],
queryRunner?: QueryRunner,
): any

Logs query that is slow.

logSchemaBuild(message: string, queryRunner?: QueryRunner): any

Logs events from the schema build process.

logMigration(message: string, queryRunner?: QueryRunner): any

Logs events from the migrations run process.

log(
level: "log" | "info" | "warn",
message: any,
queryRunner?: QueryRunner,
): any

Perform logging using given logger, or by default to the console. Log has its own level and message.