]> git.mxchange.org Git - friendica.git/commitdiff
Add callstack context to cascade deletion debug logging
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 3 Mar 2020 06:48:21 +0000 (01:48 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 4 Mar 2020 15:30:55 +0000 (10:30 -0500)
src/Database/Database.php

index ff25e8b199d76cc9acb03abb0f2f15442d23e6ec..50b45d675ffb576d4b1cdd3abc551bb744a6df49 100644 (file)
@@ -1262,7 +1262,7 @@ class Database
 
                        if ((count($command['conditions']) > 1) || is_int($first_key)) {
                                $sql = "DELETE FROM " . DBA::quoteIdentifier($command['table']) . " " . $condition_string;
-                               $this->logger->debug($this->replaceParameters($sql, $conditions));
+                               $this->logger->debug($this->replaceParameters($sql, $conditions), ['callstack' => System::callstack(6), 'internal_callstack' => $callstack]);
 
                                if (!$this->e($sql, $conditions)) {
                                        if ($do_transaction) {
@@ -1292,7 +1292,7 @@ class Database
                                        $sql = "DELETE FROM " . DBA::quoteIdentifier($table) . " WHERE " . DBA::quoteIdentifier($field) . " IN (" .
                                               substr(str_repeat("?, ", count($field_values)), 0, -2) . ");";
 
-                                       $this->logger->debug($this->replaceParameters($sql, $field_values));
+                                       $this->logger->debug($this->replaceParameters($sql, $field_values), ['callstack' => System::callstack(6), 'internal_callstack' => $callstack]);
 
                                        if (!$this->e($sql, $field_values)) {
                                                if ($do_transaction) {