Quiero un viejo amor.

Que hablemos por teléfono hasta tres de la mañana, aún cuando debiéramos estar durmiendo, compartiendo nuestros pensamientos y debatiendo algo en particular; o quizá no. Que me regales un libro tuyo…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Serilog for logging .NET Core apps

Why to add new framework to our application when we have log4net which is famous across the industry and a standard framework in .NET stack for several years ?

log4net is a port of log4j a Java logging framework. log4net is great for logging text based content.

In the era of Big data and analytics text based logs are not good enough, we need to log more data and data in structured format such JSON. These structured logs can be saved to flat files or to databases and can be used to create dashboards, alerts, graphs, charts and reports.

So how to log structured data ?

The answer is Serilog framework, Serilog is most famous and 3rd most downloaded software in Microsoft NuGet Manager.

When you want to log an object with its properties , when you want to enrich you log with additional data such as Source Context, Request Path, Request Method, Machine Name etc. Serilog is the best framework in .NET world.

Serilog has sink concept in place and we can sink the logged to data to multiple sinks such as console, JSON files, SQL databases and NoSQL databases.

While Serilog is used for any .NET framework, it is a great fit for ASP.NET Core projects as Serilog takes care of logging http request and response

What is the best way to log your data in .NET applications? What are industries best practices ?

or

How to instrument a log using Serilog in .NET application will be discussed in the fallowing article

Add a comment

Related posts:

A WEEK OFF FROM SOCIAL MEDIA

A week off from social media, well after reading the title itself many of the readers might have stopped reading the blog, as it may seem from the title that the topic seems bore, but actually it is…

Migrant workers in the Mumbai Metropolitan Region and the lockdown

The COVID-19 pandemic and the ensuing lockdowns exposed existing faultlines, especially the issues regarding migrant workers. This blog highlights reasons for reverse migration, broad trends and…

HELIOCENTRISM THEORY

Heliocentrism is the astronomical model in which the Earth and planets revolve around the Sun at the center of the Solar System. Historically, heliocentrism was opposed to geocentrism, which placed…