Default Mosaic logger class. Used to write logs to the console in JSON format (no line breaks).

Hierarchy

  • Logger

Constructors

  • Creates a Logger instance using provided options object. Default values are used if options are not provided.

    Parameters

    Returns Logger

Properties

config: any
format: any
getLogFn: any
getLogFormatter: any

Gets the middleware at the moment of the log generation, since the Logger instance can be created before the global log middleware setup.

getLogMiddleware: any

Gets the middleware at the moment of the log generation, since the Logger instance can be created before the global log middleware setup.

getLogRetention: any
getMaskMiddleware: any

Gets the middleware at the moment of the log generation, since the Logger instance can be created before the global log middleware setup.

getSkipMaskMiddleware: any

Gets the middleware at the moment of the log generation, since the Logger instance can be created before the global log middleware setup.

logFormatter?: any
logMiddleware: any
loggerContext: any
maskMiddleware?: any
maxLevel: any
processArgsAndWriteLog: any
setMaxLogLevel: any
skipLog: any
skipMaskMiddleware?: any

Methods

  • Parameters

    Returns void

  • Parameters

    • error: Error

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • error: Error

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • error: Error

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • error: Error

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • error: Error

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • error: Error

    Returns void

  • Parameters

    Returns void

  • Writes a log message. Log level and errors can optionally be set.

    Parameters

    • message: string | LogMessage

      The message that will be logged.

    • Optional __namedParameters: {
          error?: Error;
          level?: LogLevel;
      }
      • Optional error?: Error

        Can be used to pass an error object along with the log entry

      • Optional level?: LogLevel

        The severity level the message should have

    Returns void

Generated using TypeDoc