API 参考
    正在准备搜索索引...

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

    层级 (查看层级一览)

    索引

    构造函数

    属性

    options?: LoggerOptions

    方法

    • Check is logging for level or message type is enabled.

      参数

      • 可选type:
            | "query"
            | "schema"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "migration"
            | "query-error"
            | "query-slow"
            | "schema-build"

      返回 boolean

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

      参数

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

      返回 void

    • Logs events from the migration run process.

      参数

      返回 void

    • Logs query and parameters used in it.

      参数

      • query: string
      • 可选parameters: any[]
      • 可选queryRunner: QueryRunner

      返回 void

    • Logs query that is failed.

      参数

      • error: string
      • query: string
      • 可选parameters: any[]
      • 可选queryRunner: QueryRunner

      返回 void

    • Logs query that is slow.

      参数

      • time: number
      • query: string
      • 可选parameters: any[]
      • 可选queryRunner: QueryRunner

      返回 void

    • Logs events from the schema build process.

      参数

      返回 void

    • Converts parameters to a string. Sometimes parameters can have circular objects and therefor we are handle this case too.

      参数

      • parameters: any[]

      返回 string | any[]