Commit ee9e7d9f5b9823777a62a5c632095d0f87197a81

Authored by Neil Blakey-Milner
1 parent 45816b07

Lower queries and other flow logging to DEBUG level.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3104 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 8 additions and 8 deletions
lib/database/dbutil.inc
@@ -50,7 +50,7 @@ class DBUtil { @@ -50,7 +50,7 @@ class DBUtil {
50 $sQuery = $query; 50 $sQuery = $query;
51 } 51 }
52 $res = $db->query($sQuery, $aParams); 52 $res = $db->query($sQuery, $aParams);
53 - $default->log->info('Query: ' . DBUtil::lastQuery($db)); 53 + $default->log->debug('Query: ' . DBUtil::lastQuery($db));
54 return $res; 54 return $res;
55 } 55 }
56 56
@@ -126,13 +126,13 @@ class DBUtil { @@ -126,13 +126,13 @@ class DBUtil {
126 126
127 function &autoInsert($sTable, $aFieldValues, $db = null) { 127 function &autoInsert($sTable, $aFieldValues, $db = null) {
128 global $default; 128 global $default;
129 - $default->log->info('AutoInsert called for table ' . $sTable); 129 + // $default->log->debug('AutoInsert called for table ' . $sTable);
130 $db =& DBUtil::getDB(); 130 $db =& DBUtil::getDB();
131 if (!array_key_exists('id', $aFieldValues)) { 131 if (!array_key_exists('id', $aFieldValues)) {
132 $aFieldValues['id'] = DBUtil::nextId($sTable, null, $db); 132 $aFieldValues['id'] = DBUtil::nextId($sTable, null, $db);
133 } 133 }
134 $res = $db->autoExecute($sTable, $aFieldValues); 134 $res = $db->autoExecute($sTable, $aFieldValues);
135 - $default->log->info('Query: ' . DBUtil::lastQuery($db)); 135 + $default->log->debug('Query: ' . DBUtil::lastQuery($db));
136 if ($res === DB_OK) { 136 if ($res === DB_OK) {
137 return $aFieldValues['id']; 137 return $aFieldValues['id'];
138 } 138 }
@@ -144,10 +144,10 @@ class DBUtil { @@ -144,10 +144,10 @@ class DBUtil {
144 144
145 function &autoUpdate($sTable, $aFieldValues, $iId, $db = null) { 145 function &autoUpdate($sTable, $aFieldValues, $iId, $db = null) {
146 global $default; 146 global $default;
147 - $default->log->info('AutoUpdate called for table ' . $sTable . ' with id ' . $iId); 147 + // $default->log->debug('AutoUpdate called for table ' . $sTable . ' with id ' . $iId);
148 $db =& DBUtil::getDB(); 148 $db =& DBUtil::getDB();
149 $res = $db->autoExecute($sTable, $aFieldValues, DB_AUTOQUERY_UPDATE, 'id = ' . $iId); 149 $res = $db->autoExecute($sTable, $aFieldValues, DB_AUTOQUERY_UPDATE, 'id = ' . $iId);
150 - $default->log->info('Query: ' . DBUtil::lastQuery($db)); 150 + $default->log->debug('Query: ' . DBUtil::lastQuery($db));
151 if ($res === DB_OK) { 151 if ($res === DB_OK) {
152 return $res; 152 return $res;
153 } 153 }
@@ -159,7 +159,7 @@ class DBUtil { @@ -159,7 +159,7 @@ class DBUtil {
159 159
160 function &whereUpdate($sTable, $aFieldValues, $aWhereFieldValues, $db = null) { 160 function &whereUpdate($sTable, $aFieldValues, $aWhereFieldValues, $db = null) {
161 global $default; 161 global $default;
162 - $default->log->info('WhereUpdate called for table ' . $sTable); 162 + //$default->log->debug('WhereUpdate called for table ' . $sTable);
163 $db =& DBUtil::getDB(); 163 $db =& DBUtil::getDB();
164 $aWhereFields = array(); 164 $aWhereFields = array();
165 foreach (array_keys($aWhereFieldValues) as $k) { 165 foreach (array_keys($aWhereFieldValues) as $k) {
@@ -172,7 +172,7 @@ class DBUtil { @@ -172,7 +172,7 @@ class DBUtil {
172 $ret =& $db->execute($sth, array_values($aValues)); 172 $ret =& $db->execute($sth, array_values($aValues));
173 $db->freePrepared($sth); 173 $db->freePrepared($sth);
174 174
175 - $default->log->info('Query: ' . DBUtil::lastQuery($db)); 175 + $default->log->debug('Query: ' . DBUtil::lastQuery($db));
176 if ($res === DB_OK) { 176 if ($res === DB_OK) {
177 return $res; 177 return $res;
178 } 178 }
@@ -189,7 +189,7 @@ class DBUtil { @@ -189,7 +189,7 @@ class DBUtil {
189 189
190 function &autoDelete($sTable, $iId, $db = null) { 190 function &autoDelete($sTable, $iId, $db = null) {
191 global $default; 191 global $default;
192 - $default->log->info('AutoDelete called for table ' . $sTable . ' with id ' . $iId); 192 + // $default->log->debug('AutoDelete called for table ' . $sTable . ' with id ' . $iId);
193 $db =& DBUtil::getDB(); 193 $db =& DBUtil::getDB();
194 $sQuery = "DELETE FROM " . $sTable . " WHERE id = ?"; 194 $sQuery = "DELETE FROM " . $sTable . " WHERE id = ?";
195 $aParams = array($iId); 195 $aParams = array($iId);