Options
All
  • Public
  • Public/Protected
  • All
Menu
     

Module LG

A collections of logging functions

Index

Functions

IF

  • IF(...args: any): void
  • Exactly like console, but only prints if the Debug option is set to true in the /config/settings.cfg.js file

    Parameters

    • Rest ...args: any

      Arguments to print to the console

    Returns void

Object

  • Object(obj: any): void
  • Prints a formatted Object as JSON to the console

    Parameters

    • obj: any

      An Object to print to the console

    Returns void

NOW

  • NOW(template?: string, ...args?: any): void
  • Prints a Log with the date

    Parameters

    • Optional template: string

      Arguments to print to the console

    • Optional Rest ...args: any

      Arguments to print to the console

    Returns void

Server

  • Server(id: string | number, prefix: string, suffix: string, color: string): void
  • Prints a formatted Server message to the console

    Parameters

    • id: string | number

      A message identifier

    • prefix: string

      A string to prepend to the message

    • suffix: string

      A string to append to the message

    • color: string

      A display color for the message

    Returns void

Timed

  • Timed(func: CBtimed, id: string | number, prefix: string, suffix: string, color: string): void
  • Prints a formatted Server message to the console

    Parameters

    • func: CBtimed

      The function to be timed

    • id: string | number

      A message identifier

    • prefix: string

      A string to prepend to the message

    • suffix: string

      A string to append to the message

    • color: string

      A display color for the message

    Returns void

Error

  • Error(id: string | number, prefix: string, suffix: string): void
  • Prints a formatted Error message to the console

    Parameters

    • id: string | number

      A message identifier

    • prefix: string

      A string to prepend to the message

    • suffix: string

      A string to append to the message

    Returns void