[shotwell/shotwell-0.24] Enable SQL debugging through environment variable
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.24] Enable SQL debugging through environment variable
- Date: Sun, 16 Oct 2016 20:40:10 +0000 (UTC)
commit 0be5c1be430cdc6b4ee7af0d0e52e10888b07a55
Author: Jens Georg <mail jensge org>
Date: Sun Oct 16 22:20:14 2016 +0200
Enable SQL debugging through environment variable
Signed-off-by: Jens Georg <mail jensge org>
src/db/DatabaseTable.vala | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/db/DatabaseTable.vala b/src/db/DatabaseTable.vala
index 09c026f..4fc8853 100644
--- a/src/db/DatabaseTable.vala
+++ b/src/db/DatabaseTable.vala
@@ -49,9 +49,13 @@ public abstract class DatabaseTable {
e.message));
}
}
-#if SQLITE_DEBUG
- db.trace (on_trace);
-#endif
+
+ unowned string? sql_debug = Environment.get_variable
+ ("SHOTWELL_SQL_DEBUG");
+
+ if (sql_debug != "") {
+ db.trace (on_trace);
+ }
}
public static void on_trace (string message) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]