Add a new, experimental logging interface designed to aid in debugging of
deeply embedded projects that use SQLite.
FossilOrigin-Name: 103321e37ae46eacfad4e127d13477ad5dd02bab
diff --git a/src/main.c b/src/main.c
index 07fe15c..e4419d2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -378,6 +378,16 @@
sqlite3GlobalConfig.nLookaside = va_arg(ap, int);
break;
}
+
+ /* Record a pointer to the logger funcction and its first argument.
+ ** The default is NULL. Logging is disabled if the function pointer is
+ ** NULL.
+ */
+ case SQLITE_CONFIG_LOG: {
+ sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));
+ sqlite3GlobalConfig.pLogArg = va_arg(ap, void*);
+ break;
+ }
default: {
rc = SQLITE_ERROR;