Function formatMessage

  • Formats the log message

    Parameters

    • message: IOMessage

      The log message to be formatted/computed.

    • format: string = '($time) [$prefix$level] $message'

      The message format to use

    • __namedParameters: Partial<FormatOptions> = {}

    Returns string

    The formatted log message.

    Variables ($name):

    • message: The message contents
    • time: The time since the program started in hh:mm:ss
    • level: The log level as a string
    • prefix: The prefix with a '/' appended if the prefix is truthy