Comments (6)
There should not be any issue with postgress.
However there can be issue with global logging configuration. If you are not using any filters for this logger and adding it in the same way as AddDebug or AddConsole, you can have such problem, because EF Core is using logging internally, so it tries to use logger which depends on it.
Try add and use logging filters and exclude all Entity Framework Core logs from storing them in database.
See https://github.com/msmolka/ZNetCS.AspNetCore.Logging.EntityFrameworkCore/blob/master/test/ZNetCS.AspNetCore.Logging.EntityFrameworkCoreTest/StartupSimple.cs, as example.
In short you should exclude any EFC internal logging from being handled by this logger. Let me know if this filter works.
from znetcs.aspnetcore.logging.entityframeworkcore.
If you still have issue with logger after exclude EF Core logs from logger please provide small example and I will try to analyse and solve.
I personally tested it with MySQL, MariaDB, SQL Server, InMemory databases and it worked.
from znetcs.aspnetcore.logging.entityframeworkcore.
It wasn't working anyway so I created my own logger.
Thank you for the attention.
from znetcs.aspnetcore.logging.entityframeworkcore.
I was wonder what was wrong, in my opinion all should work. But ok, closing.
from znetcs.aspnetcore.logging.entityframeworkcore.
If anyone is interested, suggested solution from @msmolka works.
I had the same problems reported by @mateusleonardi with different databases (mariadb, sql server and sqlite), giving different errors but anyway not working (working fine where i removed database logging).
If i add a filter to ignore microsoft and system logs (and add "Microsoft.Extensions.Logging.Filter" to dependencies) everything works fine (both app and database logs)
edit: you can find a sample working project at https://github.com/pdesterlich/LoggingTest
from znetcs.aspnetcore.logging.entityframeworkcore.
@pdesterlich thank for more testing and confirmation. I'm using this library on daily basis and the only issue is to make sure you are not logging (using this logger) anything related to Microsoft.EntityFrameworkCore.
This is because each log of EFCore will cause to log. So obviously Stack Overflow
from znetcs.aspnetcore.logging.entityframeworkcore.
Related Issues (4)
- how to test the logging HOT 5
- Connect Timeout with MySQL HOT 2
- Stop exception handling? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from znetcs.aspnetcore.logging.entityframeworkcore.