Options
All
  • Public
  • Public/Protected
  • All
Menu

Performs logging of the events in TypeORM. This version of logger uses console to log events and does not use syntax highlighting.

Hierarchy

  • SimpleConsoleLogger

Implements

Index

Constructors

constructor

Properties

Private Optional options

options: LoggerOptions

Methods

log

  • log(level: "log" | "info" | "warn", message: any, queryRunner?: QueryRunner): void
  • Perform logging using given logger, or by default to the console. Log has its own level and message.

    Parameters

    • level: "log" | "info" | "warn"
    • message: any
    • Optional queryRunner: QueryRunner

    Returns void

logMigration

  • logMigration(message: string, queryRunner?: QueryRunner): void

logQuery

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

logQueryError

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

logQuerySlow

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

logSchemaBuild

  • logSchemaBuild(message: string, queryRunner?: QueryRunner): void

Protected stringifyParams

  • stringifyParams(parameters: any[]): string | any[]
  • Converts parameters to a string. Sometimes parameters can have circular objects and therefor we are handle this case too.

    Parameters

    • parameters: any[]

    Returns string | any[]

Generated using TypeDoc