[Bps-public-commit] rt-extension-debugtimers branch, devel, updated. f8c0a6a537d55562fa0f656a7cceaf202fd3efb1

Craig Kaiser craig at bestpractical.com
Tue Feb 12 13:46:00 EST 2019


The branch, devel has been updated
       via  f8c0a6a537d55562fa0f656a7cceaf202fd3efb1 (commit)
      from  6f8ca1ec033b6644a4c673b7119d815605d5c365 (commit)

Summary of changes:
 lib/RT/Interface/Web_Local.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit f8c0a6a537d55562fa0f656a7cceaf202fd3efb1
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Tue Feb 12 13:45:54 2019 -0500

    Add query args to debug log

diff --git a/lib/RT/Interface/Web_Local.pm b/lib/RT/Interface/Web_Local.pm
index f8b4954..27f3da5 100644
--- a/lib/RT/Interface/Web_Local.pm
+++ b/lib/RT/Interface/Web_Local.pm
@@ -1,5 +1,6 @@
 use strict;
 use warnings;
+no warnings "redefine";
 
 package RT::Interface::Web;
 
@@ -129,12 +130,16 @@ sub HandleRequest {
 
     use RT::Util;
     my $time = Time::HiRes::tv_interval( $HTML::Mason::Commands::m->{'rt_base_time'});
-    my $time_threshold = RT::Config->Get('LongRequestThreshold')|| 100;
+    my $time_threshold = defined RT::Config->Get('LongRequestThreshold') ? RT::Config->Get('LongRequestThreshold') : 100;
+
+    my @request_args;
+    map { push @request_args, "$_=" . $HTML::Mason::Commands::m->request_args->{$_} } keys %{$HTML::Mason::Commands::m->request_args};
+    my $request_args = join '&', @request_args;
 
     RT::Logger->error(
         "Leaving autohandler, time is: " . $time . "\n"
         . "User making the request: " . $HTML::Mason::Commands::session{'CurrentUser'}->Name . "\n"
-        . "Request URL: " . $HTML::Mason::Commands::m->request_path . "\n"
+        . "Request URL: " . $HTML::Mason::Commands::m->request_comp->path . "?$request_args \n"
     ) if $time >= $time_threshold;
 }
 

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


More information about the Bps-public-commit mailing list