I'm using System.Data.SQLite with NHibernate & Fluent NHibernate. I encountered some strange bug and I would like to log all queries executed on the SQLite database.
I already know about the ShowSQL NHibernate configuration option but I would like to log directly from SQLite. I found out about sqlite3_trace()
but how to use it from .Net/NHibernate ?
In fact what I would like is a SQL profiler for SQLite.
Edit: I found the cause of the "strange" bug : after the schema was updated automatically by NHibernate DDL a SQL script was executed using ISession.CreateSQLQuery()
witch dropped then recreated a table. No wonder the newly mapped properties where missing from that table. And those queries didn't appear in the logs...