Will be making use of Serilog to log for our application. To get started we need the following Nuget packages. Serilog.AspNetCore Serilog.Settings.Configuration Serilog.Sinks.Console Serilog.Sinks.RollingFile StartUp.cs using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Serilog; namespace MyBlog { public class Startup { public Startup(IConfiguration configuration) { Log.Logger = new LoggerConfiguration().ReadFrom.Configuration(configuration).CreateLogger(); // <-- add for logging Configuration = configuration; } public IConfiguration Configuration { get; } ...
I (Alvin Vafana Microsoft Certified Solutions Developer (MCSD)). Talks about my journey as a developer and offer solutions to challenges i faced