EES-5013 Suppress SQL command console logging in Function apps #5024
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR suppresses the
DbCommand
SQL console logging seen in our Azure Function apps when running locally that started occurring after either the change to use the Isolated Worker Model in #4673 or the .NET 8 update in #4639.This has been making it difficult to spot exceptions and other log messages because they are surrounded by superfluous SQL command logging.
This PR brings the logging config in sync with the Public Data Processor function app where this fix has already been applied.
Note that this doesn't completely close the issue as we still leave a
TODO
in the code to answer why we can’t we filterMicrosoft.EntityFrameworkCore.Database.Command
using standard logging config in app settings.We normally control SQL command logging by setting the
Microsoft.EntityFrameworkCore.Database.Command
filter in the logging configuration. E.g. to turn it on: