← Back to team overview

anewt-developers team mailing list archive

[Branch ~uws/anewt/anewt.uws] Rev 1790: [database] Log executed queries as debug messages

 

------------------------------------------------------------
revno: 1790
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt
timestamp: Sat 2010-10-02 15:21:01 +0200
message:
  [database] Log executed queries as debug messages
modified:
  database/connection.lib.php


--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws

Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription
=== modified file 'database/connection.lib.php'
--- database/connection.lib.php	2009-08-02 19:08:38 +0000
+++ database/connection.lib.php	2010-10-02 13:21:01 +0000
@@ -7,6 +7,8 @@
  * See the README file for more information.
  */
 
+anewt_include('logging');
+
 
 /**
  * Abstract database connection class.
@@ -389,6 +391,7 @@
 
 		$this->queries_executed[] = $sql;
 
+		AnewtLog::debug_with_domain('anewt-database', 'Executing SQL query: %s', $sql);
 		return $this->real_execute_sql($sql);
 	}