vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r10509: LJSUP-8793: log incoming to Apache reque...

Committer: vad
LJSUP-8793: log incoming to Apache request's start and stop to file
U   trunk/cgi-bin/LJ/Hooks/SUP.pm
Modified: trunk/cgi-bin/LJ/Hooks/SUP.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/SUP.pm	2011-05-13 08:34:59 UTC (rev 10508)
+++ trunk/cgi-bin/LJ/Hooks/SUP.pm	2011-05-14 06:29:47 UTC (rev 10509)
@@ -1019,22 +1019,26 @@
  LJ::register_hook("post_read_request" => sub {
     return unless LJ::is_enabled("log_requests_start_stop");
 
+    my $rec = LJ::Request->header_in("Host") . LJ::Request->uri . "?" . LJ::Request->args;
+
     ## write from all process to the same file may cause data corruption,
     ## but it is not critical here.
     local *FILE;
     open FILE, ">>", $LJ::REQUESTS_LOG_FILE or warn "Can't open $LJ::REQUESTS_LOG_FILE: $!";
-    print FILE "S $$ " . time() . " " . LJ::Request->uri . "\n";
+    print FILE "S $$ " . time() . " " . $rec . "\n";
     close FILE;
 
  });
  LJ::register_hook("clenaup_end_request" => sub {
     return unless LJ::is_enabled("log_requests_start_stop");
 
+    my $rec = LJ::Request->header_in("Host") . LJ::Request->uri . "?" . LJ::Request->args;
+
     ## write from all process to the same file may cause data corruption,
     ## but it is not critical here.
     local *FILE;
     open FILE, ">>", $LJ::REQUESTS_LOG_FILE or warn "Can't open $LJ::REQUESTS_LOG_FILE: $!";
-    print FILE "E $$ " . time() . " " . LJ::Request->uri . "\n";
+    print FILE "E $$ " . time() . " " . $rec . "\n";
     close FILE;
 
  });

Tags: ljcom, pm, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments