Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Are there any dependencies or dependencies on serilog?


Asked by Kaison Frank on Dec 02, 2021 FAQ



No dependencies. No dependencies. Write Serilog events to text files in plain or JSON format. A Serilog sink that writes log events to the console/terminal. A simple, compact JSON-based event format for Serilog. Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
In respect to this,
Serilog, introduced in 2013, quickly gained popularity in the .NET world. With the venerable log4net already falling by the wayside, and with NLog starting to show its age, the stage was set for a new contender. However, Serilog is a static-style library which appears to make it very unfriendly to dependency injection.
Similarly, You haven't posted any logging configuration code yet, so I assume it's missing. There are several packages that integrate Serilog with the Logging extensions, some working with the generic host, some adding extensions specific to ASP.NET Core.
In addition,
If you are having any problems with Serilog, you can subscribe to it’s internal events and write them to your debug window or a console. Please note that the internal logging will not write to any user-defined sinks. Be sure to use verbose, debug, information, warning, error, and fatal logging levels as appropriate.
Subsequently,
Serilog already has a good story for adding logging to your traditional HTTP ASP.NET Core apps with the Serilog.AspNetCore library, as well as an extensive list of available sinks. Unfortunately, the abstraction incompatibilities mean that you can't use this library with generic host ASP.NET Core apps.