[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.4-260-g38ce6ca36e

? sunnavy sunnavy at bestpractical.com
Wed Mar 10 13:18:06 EST 2021


The branch, 4.4-trunk has been updated
       via  38ce6ca36e0b855677a5b2f50775725ed4d29b8c (commit)
      from  8cb0f8354a38c0d50311b39c717c786093122450 (commit)

Summary of changes:
 lib/RT/Interface/Web.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 38ce6ca36e0b855677a5b2f50775725ed4d29b8c
Author: Gregor Wolter <26737600+g-wolter at users.noreply.github.com>
Date:   Fri Oct 18 10:54:32 2019 +0200

    Add username to SQL statment log
    
    Added the name of the user to the his corresponding SQL statements.
    Proofed to be useful for debugging as well as analyzing perfomance
    issues.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index fa81b0fe3c..968707bb15 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1321,7 +1321,9 @@ sub LogRecordedSQLStatements {
         }
         $RT::Logger->log(
             level   => $log_sql_statements,
-            message => "SQL("
+            message => ($HTML::Mason::Commands::session{'CurrentUser'}->Name // '')
+                . " - "
+                . "SQL("
                 . sprintf( "%.6f", $duration )
                 . "s): $sql;"
                 . ( @bind ? "  [ bound values: @{[map{ defined $_ ? qq|'$_'| : 'undef'} @bind]} ]" : "" )

-----------------------------------------------------------------------


More information about the rt-commit mailing list