Options
All
  • Public
  • Public/Protected
  • All
Menu

This class implements multiple loglevels with different appenders

Hierarchy

  • Logger

Index

Constructors

  • new Logger(module?: string, className?: string): Logger
  • Get the module name and class name while create logger object

    example
    const logger = new Logger('module name', class name');
    

    Parameters

    • Optional module: string

      Module name as an optional

    • Optional className: string

      Class name as an optional

    Returns Logger

Properties

className: string
maxEventLogLength: 100 = 100
module: string
config: LoggerConfig = ...
eventLog: string[] = []

Methods

  • getEventLog(): string[]
  • Saves messages into an array with the most recent first. It pops the oldest message off the back when it reaches max length

    example

    sendToEventLog(message);

    Parameters

    • message: LogMessage

      the message string to save into the eventlog

    Returns void

  • Set the multiple appenders and log level in Logger

    example
    setConfig({appenders:[ConsoleLogAppender], level: 0});
    

    Parameters

    Returns void

Generated using TypeDoc