This function is called on each record logged and should format the
log record and output it to the given Formatter.

The format function is expected to output the string directly to the
Formatter so that implementations can use the std::fmt macros
to format and output without intermediate heap allocations. The default
env_logger formatter takes advantage of this.