How to log generated sql queries (without mysql profiler)?
I'm using Simple.Data.Mysql
You have a couple of choices here. You can either set up a trace listener like this and then yes it will show up in the VS output window.
<configuration>
<system.diagnostics>
<switches>
<add name="Simple.Data" value="Info" />
</switches>
</system.diagnostics>
</configuration>
Or you can also have a look at the ExampleRunner and ExampleTestListener classes in Simple.Data.Sample for an example of setting it up in code.
All generated SQL statements (plus parameter values) are written to Trace by default, so you can just hook up a Listener.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With