Last post Feb 14, 2017 12:40 AM by watsongeeks
Jun 24, 2016 07:22 AM|Anitha karishetty|LINK
I need logs into a text file instead of console , using asp.net core 1.0 rc2 the log4net is not supporting and the latest version from nuget is log4net 2.0.5 . how to use log4net for my asp.net core rc2 application.
Jun 24, 2016 08:36 AM|maherjendoubi|LINK
You can use Serilog in your ASP.NET Core RC2 project, add the following dependencies in your project.json file:
Create the logger in the Startup constructor:
public Startup(IApplicationEnvironment appEnv)
Log.Logger = new LoggerConfiguration()
and add Serilog in the Startup.Configure method:
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
Jun 24, 2016 08:56 AM|Anitha karishetty|LINK
Thanks for your reply,
Serilog is compatible with RC2 but log4net is not compatible i think becoz there is no latest version which i can use in asp.net core RC2 , but there are articles which shows logging with log4net 2.0.3 in asp.net 5 below:
i tried in the same way that targeting the log4net 2.0.5 dll in other framework in project.json file but its not working.
hope, log4net will support .Net core in future, right now its better to go head with alternative logging frameworks.
Jun 28, 2016 01:52 PM|t_shah|LINK
Any idea how to log into SQL database instead of File log?
Feb 14, 2017 12:40 AM|watsongeeks|LINK
I just put together a blog post showing how to make log4net work with .NET Core v1.0. With log4net 2.0.7 it supports NetStandard 1.3 but you have to manually setup the configs. Check it out!