Category Logging

ASP.NET Core logging with NLog and Elasticsearch

This article shows how to Log to Elasticsearch using NLog in an ASP.NET Core application. NLog is a free open-source logging for .NET. Code: https://github.com/damienbod/AspNetCoreNlog 17.12.2016 Updated to ASP.NET Core 1.1 NLog posts in this series: ASP.NET Core logging with NLog and Microsoft SQL Server ASP.NET Core logging with NLog and Elasticsearch Settings the NLog […]

Web API Tracing with SLAB and Elasticsearch

The article demonstrates how to use Web API Tracing, and trace the data using SLAB, in-process or out-of-process to a flat file or an Elasticsearch sink. Semantic.Logging from Enterprise Library now includes an Elasticsearch sink. The NuGet package also includes an implementation of the IExceptionLogger interface and a logging ActionFilter which logs the data using […]

Semanic Logging with Elasticsearch using SemanticLogging.Elasticsearch NuGet package

The Enterprise Library team have released a new Semantic Logging Application Block which now includes an Elasticsearch sink. I have also created a Slab.Elasticsearch NuGet package but do not see the point in supporting this anymore, now that it is part of the SLAB itself. One of the major features which my package was missing, […]

Using Web API with a Nest elasticsearch backend

This article demonstrates how to create a Web API RESTful service and use Elasticsearch as the persistence infrastructure. Nest is used to access Elasticsearch store. Simple CRUD is supported in the controller. code: https://github.com/damienbod/WebAPIRestWithNest Update 2014.09.28: updated all NuGet packages and fixed NEST, breaking changes in version 1 Structure The Application structure is based on […]

Exploring Web API Exception Handling

In this article, exception handling is explored for Web API. The standard features from Web API 2 are shown as well as the global exception handling released in version 2.1. code: https://github.com/damienbod/WebApi2_1ExceptionHandling Using the HttpResponseException class The following two examples demonstrates how the HttpResponseException class can be used in simple action methods. The HttpStatusCode enum […]

Semantic Logging with Elasticsearch

UPDATE: This NuGet package will no longer be supported as SLAB now supports an Elasticsearch sink. This blog still demonstates how to create a custom sink for SLAB. With the version 1.1 bulk inserts can also be used for custom sinks. See https://damienbod.wordpress.com/2014/04/02/semanic-logging-with-elasticsearch-using-semanticlogging-elasticsearch-nuget-package/ This post demonstrates how to create a Semantic.Logging Sink which adds documents […]

Getting started with Elasticsearch and .NET

At present there are 2 main players in the full text searches for applications. Solr and Elasticsearch. Both are built using Lucene. There’s a lot of dicussion about which is the best, but for me, Elasticsearch provides some better features and seems to be growing faster. I decided to choose Elasticsearch because you require no […]