Request: Per-connection equivalent to SQLITE_CONFIG_LOG
Our library is registering a SQLITE_CONFIG_LOG callback* to log error messages. This can provide useful information about errors returned by SQLite. However, we’ve found a side effect that, since this callback is global, it gets called due to activity from other clients using SQLite in the same process. (This is on iOS, where SQLite is a ubiquitous system-provided DLL that is used by a lot of OS APIs, as well as many 3rd party libraries used in apps.)
So for example, we sometimes end up logging
WARNING: SQLite error (code 1): no such table: cfurl_cache_response
which has nothing to do with our library, rather with the system CFNetwork framework.
It’s not a big deal, but some developers freak about warning messages and will either file support tickets or ask for help on our forums, which increases our workload.
My request is for some equivalent of this functionality which is scoped to a specific database connection, so that we only hear about SQLite warnings regarding our own activity.
(Yes, statically linking our own copy of SQLite would solve this problem. But it would increase our code size by a megabyte or so, which is undesirable for a mobile-focused library. Moreover, there are database corruption issues that can be caused by having multiple copies of SQLite code running in a single process.)