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

https://github.com/xfischer/coreloggingtests

Tests with standard logging in dot net core
https://github.com/xfischer/coreloggingtests

dotnet-core dotnet-framework dotnet-standard logging sample-project

Last synced: about 1 month ago
JSON representation

Tests with standard logging in dot net core

Awesome Lists containing this project

README

        

# CoreLoggingTests

Support files for the blog post : [Logging in a .Net Core Library](https://xfischer.github.io/logging-dotnet-core/)

**A simple test solution with :**
- A library emiting logs with ILogger from *Microsoft.Extensions.Logging.Abstractions*
- A console app referencing the library and setting up filtered listeners using Dependency Injection

**Conclusion :**
- You can setup logging in a library without forcing a concrete logging implementation.
- It's up to the app referencing your library to choose whether to listen to traces and to choose among well known providers (NLog, Serilog, ...)

**Sources :**
- [Logging in ASP.NET Core](https://docs.microsoft.com/aspnet/core/fundamentals/logging/?view=aspnetcore-2.)

**Used frameworks**
- .Net Standard 2.1
- .Net Framework 4.6.1
- .Net Core 3.1