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?
相关问题
- NOT DISTINCT query in mySQL
- Flush single app django 1.9
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
相关文章
- how do I log requests and responses for debugging
- EF Core 'another instance is already being tra
- Re-target .NET Core to net471, net 472
- Connection pooling vs persist connection mysqli
- How to replace Middleware in integration tests pro
- Why CsvHelper not reading from MemoryStream?
- Android Studio doesn't display logs by package
- How to define function that returns html in asp.ne
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
You can implement
ILoggerFactory
andILogger
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.