Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Logger

A logger that will not produce any output.

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

Hierarchy

Index

Properties

errorCount

errorCount: number = 0

How many error messages have been logged?

Methods

diagnostic

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

    Parameters

    • diagnostic: Diagnostic

      The TypeScript message that should be logged.

    Returns void

diagnostics

  • diagnostics(diagnostics: ReadonlyArray<Diagnostic>): void
  • Print the given TypeScript log messages.

    Parameters

    • diagnostics: ReadonlyArray<Diagnostic>

      The TypeScript messages that should be logged.

    Returns void

error

  • error(text: string, ...args: string[]): void
  • Log the given error.

    Parameters

    • text: string

      The error that should be logged.

    • Rest ...args: string[]

      The arguments that should be printed into the given error.

    Returns void

hasErrors

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

    Returns boolean

log

  • log(message: string, level?: LogLevel, newLine?: boolean): void
  • Print a log message.

    Parameters

    • message: string

      The message itself.

    • Default value level: LogLevel = LogLevel.Info

      The urgency of the log message.

    • Optional newLine: boolean

      Should the logger print a trailing whitespace?

    Returns void

resetErrors

  • resetErrors(): void

success

  • success(text: string, ...args: string[]): void
  • Log the given success message.

    Parameters

    • text: string

      The message that should be logged.

    • Rest ...args: string[]

      The arguments that should be printed into the given message.

    Returns void

verbose

  • verbose(text: string, ...args: string[]): void
  • Log the given verbose message.

    Parameters

    • text: string

      The message that should be logged.

    • Rest ...args: string[]

      The arguments that should be printed into the given message.

    Returns void

warn

  • warn(text: string, ...args: string[]): void
  • Log the given warning.

    Parameters

    • text: string

      The warning that should be logged.

    • Rest ...args: string[]

      The arguments that should be printed into the given warning.

    Returns void

write

  • write(text: string, ...args: string[]): void
  • Log the given message.

    Parameters

    • text: string

      The message that should be logged.

    • Rest ...args: string[]

      The arguments that should be printed into the given message.

    Returns void

writeln

  • writeln(text: string, ...args: string[]): void
  • Log the given message with a trailing whitespace.

    Parameters

    • text: string

      The message that should be logged.

    • Rest ...args: string[]

      The arguments that should be printed into the given message.

    Returns void

Generated using TypeDoc