in src/AWS.Logger.AspNetCore/AWSLoggerBuilderExtensions.cs [69:88]
public static ILoggingBuilder AddAWSProvider(this ILoggingBuilder builder, Func<LogLevel, object, Exception, string> formatter = null)
{
var configuration = GetConfiguration(builder.Services);
// If configuration or configSection is null. Assuming the logger is being activated in a debug environment
// and skip adding the provider. We don't want to prevent developers running their application
// locally because they don't have access or want to use AWS for their local development.
if (configuration == null)
{
return builder;
}
var configSection = configuration.GetAWSLoggingConfigSection();
if (configSection == null)
{
return builder;
}
return AddAWSProvider(builder, configSection, formatter);
}