March 20, 2017

Serilog - dotnet core package a day - 1

Overview

This post is part of a series, dotnet core package a day, where for 15 days I will be posting an overview of an awesome OSS dotnet package that already has support for dotnet core. In this post we will cover Serilog.

Serilog is an awesome dotnet library for logging. Don't take my word for it though, at the time of writing it has 1,868,319 downloads on NuGet. Here is the official take on it:

Like many other libraries for .NET, Serilog provides diagnostic logging to files, the console, and elsewhere. It is easy to set up, has a clean API, and is portable between recent dotnet platforms.

Unlike other logging libraries, Serilog is built from the ground up to record structured event data.

Serilog is backed heavily by the dotnet community and is very actively developed, it offers "best-in-class" dotnet core support and as far as I can tell has done for quite some time. The publish of its v2.0.0 release to NuGet on the 27th June 2016 was the first version to support dotnet core (.net standard 1.0 and .net standard 1.3). It also has support for the new Microsoft.Extensions.Logging abstraction.

Serilog exposes the concept of sinks, there are sinks available to write log events to a variety of storage platforms and formats. Ranging from the console to cloud analytics platforms such as Azure Analytics, New Relic, and Stackify, there is almost certainly a sink available that will fit your logging needs. Many of the sinks are maintained by the core Serilog team but there is also an ecosystem of community developed sinks. Even better is that many of the available sinks also have dotnet core support.

I am using Serilog quite heavily as part of a migration to dotnet core at the awesome Open Energy Market and am happy to be doing so with well written, community developed, cross platform, and easy to use libraries like Serilog.

What the community thinks

tweet

tweet

tweet

Links

Massive thanks to Nicholas and the community.

Alternatives

Some other alternatives with dotnet core support.

If you don't want to keep checking back for more posts in this series but do want an email in your inbox then you can subscribe to the mailing list below.


Tags: logging dotnet core serilog