Skip to content

Use built-in C# Logging abstraction instead of Serilog #392

@jkroll-deepgram

Description

@jkroll-deepgram

Proposed changes

Enterprise customer request: Move away from Serilog and use the Microsoft-provided abstraction layer.

Context

Deepgram uses a Logger class throughout the .NET SDK. Unfortunately the Logger is using Serilog instead of relying on the built-in C# abstraction for logging in Microsoft.Extensions.Logging.Abstractions, which means that anyone using your SDK and a different logger, cannot override the formatting of the logs. This is a problem when combined with Kibana for log watching, as your plain-text logs break the JSON index.

Possible Implementation

Deepgram's code: https://github.com/deepgram/deepgram-dotnet-sdk/blob/main/Deepgram/Logger/Log.cs

Standardized way of logging in libraries in C#: https://www.nuget.org/packages/microsoft.extensions.logging.abstractions/

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions