in src/Elastic.Serilog.Sinks/ConfigSinkExtensions.cs [27:72]
public static LoggerConfiguration Elasticsearch(
this LoggerSinkConfiguration loggerConfiguration,
BootstrapMethod bootstrapMethod,
ICollection<Uri> nodes,
bool useSniffing = false,
string? dataStream = null,
string? ilmPolicy = null,
string? apiKey = null,
string? username = null,
string? password = null,
bool? includeHost = null,
bool? includeActivity = null,
bool? includeProcess = null,
bool? includeUser = null,
ICollection<string>? filterProperties = null,
int? maxRetries = null,
int? maxConcurrency = null,
int? maxInflight = null,
int? maxExportSize = null,
TimeSpan? maxLifeTime = null,
BoundedChannelFullMode? fullMode = null,
Uri? proxy = null,
string? proxyUsername = null,
string? proxyPassword = null,
string? fingerprint = null,
bool debugMode = false,
LoggingLevelSwitch? levelSwitch = null,
LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum
)
{
var transportConfig = useSniffing ? TransportHelper.Sniffing(nodes) : TransportHelper.Static(nodes);
SetTransportConfig(transportConfig, apiKey, username, password, proxy, proxyUsername, proxyPassword, fingerprint, debugMode
);
var sinkOptions = CreateSinkOptions(transportConfig,
bootstrapMethod, dataStream, ilmPolicy, includeHost, includeActivity, includeProcess, includeUser, filterProperties
);
SetBufferOptions(sinkOptions, maxRetries, maxConcurrency, maxInflight, maxExportSize, maxLifeTime, fullMode);
return loggerConfiguration.Sink(new ElasticsearchSink(sinkOptions), restrictedToMinimumLevel, levelSwitch);
}