I want to create a logging framework in my asp.net MVC 5 project. My Startup class looks like this:
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
However, when I look at ASP.Net MVC Core project, the Startup class is like this:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
Is it possible to include ILoggerFactory in MVC 5? If this is possible, how should I initialize/register it? Is it something that needs to be done in global.asax or Startup?