@deep/nest-kit
    Preparing search index...

    Class NestSystemLogger

    Hierarchy

    • ConsoleLogger
      • NestSystemLogger
    Index

    Constructors

    • Returns NestSystemLogger

    • Parameters

      • context: string

      Returns NestSystemLogger

    • Parameters

      • options: ConsoleLoggerOptions

      Returns NestSystemLogger

    • Parameters

      • context: string
      • options: ConsoleLoggerOptions

      Returns NestSystemLogger

    Properties

    context?: string

    The context of the logger (can be set manually or automatically inferred).

    inspectOptions: InspectOptions

    The options used for the "inspect" method.

    options: ConsoleLoggerOptions

    The options of the logger.

    originalContext?: string

    The original context of the logger (set in the constructor).

    lastTimestampAt?: number

    The last timestamp at which the log message was printed.

    Methods

    • Parameters

      • message: string
      • logLevel: "verbose" | "debug" | "error" | "warn" | "log" | "fatal"

      Returns string

    • Write a 'debug' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • Optionalcontext: string

      Returns void

    • Write a 'debug' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • ...optionalParams: any[]

      Returns void

    • Write an 'error' level log, if the configured level allows for it. Prints to stderr with newline.

      Parameters

      • message: any
      • OptionalstackOrContext: string

      Returns void

    • Write an 'error' level log, if the configured level allows for it. Prints to stderr with newline.

      Parameters

      • message: any
      • Optionalstack: string
      • Optionalcontext: string

      Returns void

    • Write an 'error' level log, if the configured level allows for it. Prints to stderr with newline.

      Parameters

      • message: any
      • ...optionalParams: any[]

      Returns void

    • Write a 'fatal' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • Optionalcontext: string

      Returns void

    • Write a 'fatal' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • ...optionalParams: any[]

      Returns void

    • Parameters

      • context: string

      Returns string

    • Parameters

      • logLevel: "verbose" | "debug" | "error" | "warn" | "log" | "fatal"
      • message: unknown
      • pidMessage: string
      • formattedLogLevel: string
      • contextMessage: string
      • timestampDiff: string

      Returns string

    • Parameters

      • pid: number

      Returns string

    • Parameters

      • timestampDiff: number

      Returns string

    • Returns InspectOptions

    • Returns string

    • Parameters

      • level: "verbose" | "debug" | "error" | "warn" | "log" | "fatal"

      Returns boolean

    • Write a 'log' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • Optionalcontext: string

      Returns void

    • Write a 'log' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • ...optionalParams: any[]

      Returns void

    • Parameters

      • message: unknown
      • options: {
            context: string;
            errorStack?: unknown;
            logLevel: "verbose" | "debug" | "error" | "warn" | "log" | "fatal";
            writeStreamType?: "stdout" | "stderr";
        }

      Returns void

    • Parameters

      • messages: unknown[]
      • Optionalcontext: string
      • OptionallogLevel: "verbose" | "debug" | "error" | "warn" | "log" | "fatal"

      Returns void

    • Parameters

      • stack: string

      Returns void

    • Resets the logger context to the value that was passed in the constructor.

      Returns void

    • Set logger context

      Parameters

      • context: string

        context

      Returns void

    • Set log levels

      Parameters

      • levels: ("verbose" | "debug" | "error" | "warn" | "log" | "fatal")[]

        log levels

      Returns void

    • Parameters

      • message: unknown

      Returns string

    • Parameters

      • key: string
      • value: unknown

      Returns unknown

    • Returns string

    • Write a 'verbose' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • Optionalcontext: string

      Returns void

    • Write a 'verbose' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • ...optionalParams: any[]

      Returns void

    • Write a 'warn' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • Optionalcontext: string

      Returns void

    • Write a 'warn' level log, if the configured level allows for it. Prints to stdout with newline.

      Parameters

      • message: any
      • ...optionalParams: any[]

      Returns void