Options
All
  • Public
  • Public/Protected
  • All
Menu

Some utilities to format messages.

Hierarchy

  • MessageFormatUtils

Index

Methods

Static renderDate

  • renderDate(date: Date, dateFormat: DateFormat): string
  • Render given date in given DateFormat and return as String.

    Parameters

    Returns string

    Formatted date

Static renderDefaultMessage

  • Renders given category log message

    Parameters

    • msg: CategoryLogMessage

      Message to format

    • addStack: boolean

      If true adds the stack to the output, otherwise skips it

    Returns string

    Formatted message

Static renderError

  • renderError(error: Error): Promise<string>
  • Render error as stack

    Parameters

    • error: Error

      Return error as Promise

    Returns Promise<string>

    Promise for stack

Generated using TypeDoc