In my old MVC5 project, all the log data was stored in the sql server database via log4net. I would like to keep the ASP.NET 5 log structure without using log4net. Is it possible to save logs in a database table? What code should I use?
You can implement ILoggerFactory and ILogger , but you like to include, for example, writing to the database.
ILoggerFactory
ILogger
Here is an example implementation of ILogger that uses EntityFramework 6 to save logs to a database.
I created a new project that is more flexible and affordable for the Entity Framework Core. Here is the GitHub project site:
https://github.com/msmolka/ZNetCS.AspNetCore.Logging.EntityFrameworkCore
Source: https://habr.com/ru/post/1238753/More articles:insmod error: insert './hello.ko': -1 Invalid module format "- linuxAJAX error and 500 server errors - javascriptjQuery Ajax for PHP MySQL - Erro (500) Cross-Domain Internal Server - jqueryUse the @Field and @Body options in Retrofit together - androidVertical text alignment in NSTextField using Swift - cocoaHow to play AMR audio file? - iosInfo property for Streams property of Powershell instance is not available compiletime - c #AVAudioPlayer does not play AMR files - iosDevirtualization compiler, not too smart? - c ++How to pass an additional parameter to the kendo template with the datasource parameter disabled - telerikAll Articles