summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 57c64a3..7425275 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -483,7 +483,8 @@ function query($query, $p = array())
if ($GLOBALS['debug_sqllog'] || $GLOBALS['debug_sqltrace'] || $slow)
{
$backtrace = (EDC('sqltrace') || $slow) ? it_debug::backtrace(1) : null;
- it::log('sqllog', "$msec\t$query\t$backtrace\t" . $this->_p['server'] . ($slow ? "\tSLOW" : ""));
+ $truncquery = strlen($query) > 1000 ? mb_substr($query, 0, 1000) . '...' : $query;
+ it::log('sqllog', "$msec\t$truncquery\t$backtrace\t" . $this->_p['server'] . ($slow ? "\tSLOW" : ""));
$this->_sqllog[] = array(
'time' => $msec,