August 2017
Intermediate to advanced
330 pages
7h 26m
English
Here, we will look at how to create an ASP.NET Core application with a web API template. The Microsoft.Extensions.Logging extension along with the Debug and Console extensions are already added.
Open the Startup class and make the following changes to view the in-built action:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { var strtpLogger = loggerFactory.CreateLogger<Startup>(); strtpLogger.LogTrace("Looking at Trace level "); strtpLogger.LogDebug("This is Debug level"); strtpLogger.LogInformation("You are Startup class - FY Information"); strtpLogger.LogWarning("Warning - Entered Startup so soon"); strtpLogger.LogError("This result in Null reference exception"); ...Read now
Unlock full access