Hi @Janik ,
I find that you have already change your post into the new forum: beginscope-usage-on-ef-core-dbcontext
Though I am not one .Net engineer and not good at this scope, I do some research , and find something maybe helpful.Just sharing them here:
entity-framework-core-log-queries-for-a-single-db-context-instance
How-to-Write-a-Custom-Logging-Provider-in-ASP-NET
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.