In order to disable FirebirdSQL logging, I need to add the following code (See here) to app.config:
<system.diagnostics>
<sources>
<source name="FirebirdSql.Data.FirebirdClient" switchValue="Off">
<listeners>
<clear />
</listeners>
</source>
</sources>
</system.diagnostics>
This succeeds, i.e. nothing is logged. Now I have do do this in C# code, but everything is logged despite my code:
TraceSource ts = new TraceSource("FirebirdSql.Data.FirebirdClient");
ts.Switch = new SourceSwitch("sourceSwitch", "Off");
var listeners = ts.Listeners;
listeners.Clear();
ts.Switch.Level = SourceLevels.Off;
which I added to the assemblies that execute SQL statements.
What am I missing?