This small application is an example to use Serilog logging library in ASP.NET Core WebAPI.
Using Serilog you can avoid to dealing with the Unit Testing with .NET Core ILogger.
Separate branch with the .NET Core 2.2 version.
- Create logger on the fly from file configuration.
- Create logger from Consul configuration. Article about: Dynamic ASP.NET Core configurations with Consul.
- Use LoggingLevelSwitch, which helps you to change the minimum log level on the fly, without restart the server or change the configuration. Dynamically changing the Serilog level.
- Calculate the execution time and display it in the log.
- Using the new Request logging middleware feature from the Serilog.AspNetCore 3.0.0 version.
- Reducing log verbosity with Serilog RequestLogging (Andrew Lock)
- Using Serilog.Exceptions library to log exception details and custom properties that are not output by default.
- You are doing logging wrong 📽50min - Nick Chapsas - NDC Oslo 2023
- Docker
- Consul/Download. Run: consul agent -dev -client=0.0.0.0 | http://localhost:8500