Skip to content
  • There are no suggestions because the search field is empty.

SDK logging — How to enable logging for the .NET SDK?

There is a method to config the logger, as shown in the SDK Example Demo that is available in the SDK repository (GeneralExample.cs):

private static ILoggerFactory CreateLoggerFactory()
{
    var serilogLogger = new LoggerConfiguration()
        .MinimumLevel.Debug()
        .WriteTo.Console()
        .CreateLogger();

    return new LoggerFactory().AddSerilog(serilogLogger);
}

You can define the logging level and where to output the log, and then implement the logger when starting the feed connection:

var loggerFactory = CreateLoggerFactory();
var feed = new Feed(config, loggerFactory);