import { FileLogger } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";
Performs logging of the events in TypeORM. This version of logger logs everything into ormlogs.log file.
Methods
protected
stringifyParams(parameters: any[])Converts parameters to a string. Sometimes parameters can have circular objects and therefor we are handle this case too.
protected
write(strings: string | string[])Writes given strings into the log file.
log()
level: "log" | "info" | "warn",
message: any,
queryRunner?: QueryRunner,
Perform logging using given logger, or by default to the console. Log has its own level and message.
logMigration(message: string, queryRunner?: QueryRunner)
Logs events from the migrations run process.
logQuery()
query: string,
parameters?: any[],
queryRunner?: QueryRunner,
Logs query and parameters used in it.
logQueryError()
error: string,
query: string,
parameters?: any[],
queryRunner?: QueryRunner,
Logs query that is failed.
logQuerySlow()
time: number,
query: string,
parameters?: any[],
queryRunner?: QueryRunner,
Logs query that is slow.
logSchemaBuild(message: string, queryRunner?: QueryRunner)
Logs events from the schema build process.