A logger that will not produce any output.

This logger also serves as the base class of other loggers as it implements all the required utility functions.

Hierarchy

  • Logger

Constructors

Properties

errorCount: number = 0

How many error messages have been logged?

level: LogLevel = LogLevel.Info

The minimum logging level to print.

warningCount: number = 0

How many warning messages have been logged?

Methods

  • deprecated(text: string, addStack?: boolean): void
  • Internal

    Parameters

    • text: string
    • addStack: boolean = true

    Returns void

  • diagnostic(diagnostic: Diagnostic): void
  • Print the given TypeScript log message.

    Parameters

    • diagnostic: Diagnostic

      The TypeScript message that should be logged.

    Returns void

  • diagnostics(diagnostics: readonly Diagnostic[]): void
  • Print the given TypeScript log messages.

    Parameters

    • diagnostics: readonly Diagnostic[]

      The TypeScript messages that should be logged.

    Returns void

  • error(text: string, node?: Node): void
  • Log the given error.

    Parameters

    • text: string

      The error that should be logged.

    • Optional node: Node

    Returns void

  • hasErrors(): boolean
  • Has an error been raised through the log method?

    Returns boolean

  • hasWarnings(): boolean
  • Has a warning been raised through the log method?

    Returns boolean

  • info(text: string): void
  • Log the given info message.

    Parameters

    • text: string

    Returns void

  • log(_message: string, level: LogLevel, _node?: Node): void
  • Print a log message.

    Parameters

    • _message: string

      The message itself.

    • level: LogLevel

      The urgency of the log message.

    • Optional _node: Node

      Optional node to be used to provide additional context about the message.

    Returns void

  • resetErrors(): void
  • Reset the error counter.

    Returns void

  • resetWarnings(): void
  • Reset the warning counter.

    Returns void

  • verbose(text: string): void
  • Log the given verbose message.

    Parameters

    • text: string

      The message that should be logged.

    Returns void

  • warn(text: string, node?: Node): void
  • Log the given warning.

    Parameters

    • text: string

      The warning that should be logged.

    • Optional node: Node

    Returns void

Generated using TypeDoc