Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Log

Index

Constructors

Methods

Constructors

constructor

  • new Log(): Log

Methods

Static add

  • add(msg: string, type?: Type, logData?: object, addData?: object, format?: string): Function
  • Adds a log to our session store.
    Won't print the log to the console itself but returns a function which prints it when it is called.

    Implemented this way in order to prevent filename & linenumber from the code that actually called Log.add.

    !!! Note !!!

    PrintLog prints the addData object before the logData object

    Parameters

    • msg: string

      The message to write

    • Optional type: Type

      Type which determines the output color in the console in FF & Chrome

    • Optional logData: object

      Additional objects to append to the output

    • Optional addData: object

      Additional data which is also added when toString is called in terse mode (not verbose...)

    • Optional format: string

      Additional format for the output (CSS like 'Color: blue', ...). Only works in FF and Chrome

    Returns Function

    Function which actually prints the added log to the console when called

Generated using TypeDoc