Name

Logger

Hierarchy

  • Logger

Constructors

Methods

Constructors

Methods

  • Adds a LogListener to this Logger. The listener is called whenever a StreamLink message with the defined LogLevel is to be logged.

    Parameters

    • listener: LogListener

      The object that implements the LogListener Interface.

    • level: LogLevel

      The LogLevel of log messages for which the listener is to be called. Only messages at or above this log level will invoke this listener.

    Returns void

  • Sends a log message to all LogListener's that have been registered for this log level or above.

    The log() method allows inline replacement of arguments. The arguments to replace these placeholders are then passed in at the end.

    Example : logger.log(LogLevel.Critical, "Error {0} has occurred with code {1}.", errorString, errorCode);

    Parameters

    • level: LogLevel

      The logging level that will be associated with the logged message.

    • message: string

      The message to log.

    • Rest ...args: any[]

      Arguments included in the log message.

    Returns void

  • Removes a LogListener that you previously added (see addListener).

    Parameters

    Returns void

Generated using TypeDoc