Util:Logging

Source: logging.ts:6

Logging utilities for console and BetterStack integration


Static Methods

logWelcomeMessage(): void

staticasync
logging.ts:49

Log a welcome message in the console

Returns

  • void

log(...messages: Array.<unknown>)

Log an INFO message with a timestamp

Parameters

  • messages (Array.<unknown>) — Messages to log

debug(...messages: Array.<unknown>)

Log a DEBUG message with a timestamp

Parameters

  • messages (Array.<unknown>) — Messages to log

warn(...messages: Array.<unknown>)

Log a WARN message with a timestamp

Parameters

  • messages (Array.<unknown>) — Messages to log

error(message: unknown, errorCode?: string)

Log an ERROR message with a timestamp and error code

Parameters

  • message (unknown) — Message to log
  • errorCode (string, optional) — Error code (defaults to UNKNOWN_ERROR)

logRequest(status: number, time: number, url: string)

Log request results

Parameters

  • status (number) — Response status code
  • time (number) — Milliseconds between request and response
  • url (string) — Path of the request