vanderlei-dev / serilog-sinks-logstash-http

.NET Logger to ELK through Logstash http plugin (https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotnet-logstash-http

.NET Logger to ELK through Logstash http plugin (https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html)

public Startup(IHostingEnvironment env)
{
    ...

    Log.Logger = new LoggerConfiguration()
        .Enrich.FromLogContext()
        .Enrich.WithProperty("ApplicationName", "Serilog.Sinks.LogstashHttp.ExampleApp")
        .WriteTo.LogstashHttp("https://elk-host:8443")
        //.MinimumLevel.Warning()
        .CreateLogger();
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
    ...

    loggerFactory.AddSerilog();

    ...
}

About

.NET Logger to ELK through Logstash http plugin (https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html)

License:Apache License 2.0


Languages

Language:C# 100.0%