I am new to asp.net core 2.0. I creating a webapi and want to configure log4net as my logging provider.
I couldn't find some working example in net. Can anyone help me provide the right link or some sample code about how to properly setup log4net in asp.net core 2.0
Things i have done so far is as below and i am not sure how to proceed further.
installed log4net.Extensions.AspNetCore;
Startup.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
loggerFactory.AddLog4Net();
// Enable CORS
app.UseCors(builder => builder.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
app.UseMvc();
}