Hi
I am trying to log the sql query text to Application Insights, but I am having issues with logging too much information when I only want the query text.
I am running an ASP.Net website. Net Framework 4.6 and LLBLGen 5.3.4
I have set the DBProviderFactory to use the Microsoft.Data.SqlClient in the gloabal.asax
SD.LLBLGen.Pro.ORMSupportClasses.RuntimeConfiguration.ConfigureDQE<SQLServerDQEConfiguration>(
c => c.AddDbProviderFactory(typeof(Microsoft.Data.SqlClient.SqlClientFactory)));
Then I added the SqlServerDQE diagnostic switch into the System.Diagnostics node in the app.config
<switches>
<add name="SqlServerDQE" value="4" />
</switches>
This is logging the query text to app insights but is also outputting Method Enter: and Method Exit: entries which I want to avoid to reduce any impact in a production environment.
I see in the documentation that ORMPlainSQLQueryExecution should just log the query but I haven't been able to determine how to configure it via the documentation as trying to add it in the diagnostics switches doesn't cause any data to be outputted to the trace.