Last post Sep 27, 2019 09:26 AM by Lewis Lu
Sep 17, 2019 07:04 PM|ChrisRTC|LINK
My goal is to incorporate logging into a table using ASP.NET Core MVC but I have run into trouble finding sample code. I have seen multiple samples of writing to the console but there must be a way to configure UseLoggerFactory to write to a table of my
choosing. Does anyone know how to set up UseLoggerFactory to write to a table or point me to some sample code.
Currently using ASP.NET Core MVC 2.2 with Oracle EF Core but the fact that it is Oracle should not matter too much.
Thanks in advance.
Sep 17, 2019 07:50 PM|maherjendoubi|LINK
Sep 18, 2019 07:41 AM|Lewis Lu|LINK
You could use loggerFactory，I found a small package to allow store logs in any data store using Entity Framework Core on github,Below is a link to this small package, I hope it can help you.
Best Regards ,
Sep 18, 2019 11:50 AM|ChrisRTC|LINK
This sample is similar to what I have and only writes to the console as far as I can see. I need a ILoggingProvider that will allow me to map the output to a specific Oracle table.
Sep 27, 2019 09:26 AM|Lewis Lu|LINK
About how to write log information to a databse table, the database type has no effect on this. It was mainly affected by your table structure.If you don't need to define the table structure yourself , you could use some third-party plugin like Serilog,
the following link is about how to use it:
For more information,you could read the following official document: