Skip to content

Make fuller use of Serilog #680

Closed
Closed

Description

@rjmholt

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

Patrick Meinecke (@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.

Activity

  1. added
    Issue-Enhancement
    on Jun 7, 2018
  2. andyleejordan commented on Nov 15, 2024

    @andyleejordan
    Member

    Good bye Serilog, and good riddance! #2197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TestIssue-Enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions