An open API service indexing awesome lists of open source software.

https://github.com/amccool/am.extensions.logging.elasticsearch

Microsoft.Extensions.Logging compatible logger posting to ElasticSearch
https://github.com/amccool/am.extensions.logging.elasticsearch

elasticsearch ilogger

Last synced: about 1 month ago
JSON representation

Microsoft.Extensions.Logging compatible logger posting to ElasticSearch

Awesome Lists containing this project

README

        

# AM.Extensions.Logging.ElasticSearch
Microsoft.Extensions.Logging compatible logger posting to ElasticSearch

![.NET Core](https://github.com/amccool/AM.Extensions.Logging.ElasticSearch/workflows/.NET%20Core/badge.svg?branch=master) - master

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

[![nuget downloads](https://img.shields.io/nuget/dt/AM.Extensions.Logging.ElasticSearch.svg)](https://www.nuget.org/packages/AM.Extensions.Logging.ElasticSearch/)
[![nuget version](https://img.shields.io/nuget/v/AM.Extensions.Logging.ElasticSearch.svg)](https://www.nuget.org/packages/AM.Extensions.Logging.ElasticSearch/)

## Getting Started

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

```ps
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 for setup of Elasticsearch index via kibana

PR's welcome