Class Logger

A Logger to store log notes when running the app.

Hierarchy

  • Logger

Constructors

Properties

entityManager: EntityManager = ...
levelIndex: number = 2
FORMAT_REGEXP: RegExp = ...
LEVELS: LogLevel[] = ...

Accessors

  • get level(): LogLevel
  • The log level which will be logged

    The log level can be one of 'trace', 'debug', 'info', 'warn', 'error'

    Returns LogLevel

  • set level(value: LogLevel): void
  • Sets the log level which will be logged

    Parameters

    • value: LogLevel

    Returns void

Methods

  • Log message at debug level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    debug

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Log message at debug level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    debug

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Log message at error level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    error

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Log message at error level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    error

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Parameters

    • message: string
    • args: any

    Returns string

  • Log message at info level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    info

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Log message at info level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    info

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Parameters

    Returns void

  • Logs a message in the default level 'info'

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Logs a message in the default level 'info'

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Logs a message with the given log level

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Parameters

    • level: string

      The level used to log the message

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Logs a message with the given log level

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Parameters

    • level: string

      The level used to log the message

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Parameters

    Returns Promise<any>

  • Log message at trace level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    trace

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Log message at trace level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    trace

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Log message at warn level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    warn

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Rest ...args: any[]

      The arguments used to interpolated the message string. The last param can be object which will be included in the log entry

    Returns Promise<any>

  • Log message at warn level

    Returns

    A promise which resolves when the log messages was logged, or null if the log level has skipped the message

    Function

    warn

    Member Of

    util.Logger.prototype

    See

    https://nodejs.org/api/util.html#util_util_format_format

    Parameters

    • message: string

      The message to log, the message string can be interpolated like the node util.format method

    • Optional data: any

      An optional object which will be included in the log entry

    Returns Promise<any>

  • Creates a Logger instance for the given EntityManager

    Returns

    The created logger instance

    Parameters

    Returns Logger

Generated using TypeDoc