Closed
Closed
@rjmholt

Description

Serilog offers a rich template string interface for logging, but currently we have a single template and build strings for it.

@SeeminglyScience suggested we should instead implement an ITextFormatter for the various things we want to log.

In the original Serilog migration I made the following choices:

  • Contain Serilog references in a single part of the code
  • Maintain the old log level system rather than Serilog's
  • Use the ILogger interface still

Serilog has fairly rich functionality but because of the way its named-argument string templating works, I'm not sure it can be used indirectly.

But a good use of Serilog would probably involve us using it directly, with its log levels, and ideally using the log-level-named methods (logger.Verbose, logger.Error, etc.).

With this, we would probably want to use Serilog's ILogger rather than our own implementation.

We should also migrate the testing away from writing a text file and toward making test sink for Serilog.