On Feb 13, 2019, at 2:10 PM, Marek Sebera <marek.seb...@gmail.com> wrote: > > re-compiling system provided library is not an option
What version and system are we talking about? It matters greatly. If we’re talking about the epochal 3.7.x series, the answers are very different than if we’re talking about a version shipped last year. > to log sqlite commands Every single API call, or only *certain* calls? And if the latter, which ones? For example, if you only want to log SQL errors, you can do it with sqlite3_config(SQLITE_CONFIG_LOG, …); If you’re on SQLite v3.14 or higher, you can use the tracing mechanism: https://sqlite.org/c3ref/trace_v2.html That plus sqlite3_expanded_sql() lets you “decompile” the parsed SQL for logging purposes. There are antecedents to those mechanisms, but they don’t work as well. In old versions of SQLite, it’s basically impossible to recover the SQL post hoc, and the precompiled SQL is often parameterized in C programs based on SQLite, so preaching didn’t work very well, either. If none of those satisfy, then there are often platform-specific API tracing mechanisms for dynamic libraries and such, but that gets you back to my first question. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users