Skip to content

Make fuller use of Serilog #680

Closed
Closed
@rjmholt

Description

@rjmholt

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions