echo $enable_debug
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(ENABLE_DEBUG, [1], [Enable debug features])
+ AC_ARG_ENABLE(sqllog,
+ [ --enable-sql-log enable sql log feature],
+ [enable_sql_log=yes], [enable_sql_log=no])
+ echo -n "enable sql log feature... "
+ echo $enable_sql_log
+ if test "x$enable_sql_log" = "xyes" ; then
+ AC_DEFINE(ENABLE_SQL_LOG, [1], [Enable SQL log feature])
+ fi
fi
AM_CONDITIONAL(USE_GTESTDBUS, [test x$gtestdbus = xyes])
return self->priv->db != NULL;
}
+#ifdef ENABLE_SQL_LOG
+void trace_callback (void *s, const char *stmt)
+{
+ if (stmt) {
+ DBG ("SQLITE TRACE: %s", stmt);
+ }
+}
+#endif
+
gboolean
_gsignond_db_sql_database_open (
GSignondDbSqlDatabase *self,
WARN ("setting file permissions on %s failed", filename);
}
+#ifdef ENABLE_SQL_LOG
+ sqlite3_trace (self->priv->db, trace_callback, NULL);
+#endif
+
if (!GSIGNOND_DB_SQL_DATABASE_GET_CLASS (self)->create (self)) {
GSIGNOND_DB_SQL_DATABASE_GET_CLASS (self)->close (self);
return FALSE;