summaryrefslogtreecommitdiffstats
path: root/lib/private/Diagnostics/QueryLogger.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Diagnostics/QueryLogger.php')
-rw-r--r--lib/private/Diagnostics/QueryLogger.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Diagnostics/QueryLogger.php b/lib/private/Diagnostics/QueryLogger.php
index 5cf7e0689f8..a30f8c7b02a 100644
--- a/lib/private/Diagnostics/QueryLogger.php
+++ b/lib/private/Diagnostics/QueryLogger.php
@@ -42,7 +42,15 @@ class QueryLogger implements IQueryLogger {
* @param array $types
*/
public function startQuery($sql, array $params = null, array $types = null) {
- $this->activeQuery = new Query($sql, $params, microtime(true));
+ $this->activeQuery = new Query($sql, $params, microtime(true), $this->getStack());
+ }
+
+ private function getStack() {
+ $stack = debug_backtrace();
+ array_shift($stack);
+ array_shift($stack);
+ array_shift($stack);
+ return $stack;
}
public function stopQuery() {