Class: Formatter

Formatter


new Formatter(template)

You can use a custom formatter if the default one does not satisfy your needs. It uses `npm:string-format` package for procesing the template, aditionaly you can set the color of parts of the template by using % folowed by one of:
  • - r red
  • - g green
  • - b blue
  • - p pink
  • - y yellow
  • - c cyan
  • `[{time.toLocaleString}] - <%m{channel}> - <%b{user}> | {severityStr} | {message} - {data}`
    Will result in something similar to:
Parameters:
Name Type Description
template String a string-format template more info here

Methods


<static> format(log)

Parameters:
Name Type Description
log Logger
Returns:
Type
String