Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.53 KB

File metadata and controls

43 lines (27 loc) · 1.53 KB

AM.Extensions.Logging.ElasticSearch

Microsoft.Extensions.Logging compatible logger posting to ElasticSearch

.NET Core - master

ElasticSearch Logger is a ILogger based logger which submits events and data to ElasticSearch making them viewable with Kibana

nuget downloads nuget version

Getting Started

Install the package from nuget.org https://www.nuget.org/packages/AM.Extensions.Logging.ElasticSearch

Install-Package AM.Extensions.Logging.ElasticSearch
 .AddLogging(builder =>
                {
                    builder
                        .AddConfiguration(loggingConfiguration.GetSection("Logging"))
                        .AddElasticSearch(options =>
                        {
                            options.ElasticsearchEndpoint = new Uri(@"http://localhost:9200/");
                            //options.IndexName = "trace";
                        });

Elasticsearch logging posting using a configurable index prefix -YYYY-MM-DD-HH the default prefix is "trace"

see https://github.com/amccool/AM.Elasticsearch.TraceListener for setup of Elasticsearch index via kibana

PR's welcome