Reputation: 2346
In my old MVC5 project all log informations was saved on a sql server database through log4net. I would like keep logger structure of ASP.NET 5 without using any more the log4net. Is it possibile saving the logs on a database table? What kind of code should I use?
Upvotes: 6
Views: 11425
Reputation: 3262
I've created new project that is a bit more flexible and available for Entity Framework Core. Here is the GitHub project site:
https://github.com/msmolka/ZNetCS.AspNetCore.Logging.EntityFrameworkCore
Upvotes: 2
Reputation: 9806
You can implement ILoggerFactory
and ILogger
however you like including, for example, logging to a database.
Here's an example of an ILogger
implementation that uses EntityFramework 6 to save logs to a database.
Upvotes: 14