You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2014/05/23 02:00:46 UTC

git commit: TS-1588: slow log should include client addr

Repository: trafficserver
Updated Branches:
  refs/heads/master c7c8c942d -> 128ca2e14


TS-1588: slow log should include client addr


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/128ca2e1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/128ca2e1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/128ca2e1

Branch: refs/heads/master
Commit: 128ca2e14a81da79ef85d08b9a3aa7844c0adccf
Parents: c7c8c94
Author: Bryan Call <bc...@apache.org>
Authored: Thu May 22 16:57:09 2014 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Thu May 22 17:00:16 2014 -0700

----------------------------------------------------------------------
 CHANGES              | 2 ++
 proxy/http/HttpSM.cc | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/128ca2e1/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d328a1f..ac63332 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-1588] slow log should include client addr
+
   *) [TS-2728] The lib/perl Makefile.am does not properly detect in-source
    builds, generating errors.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/128ca2e1/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 9066968..13fe6a9 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -6634,8 +6634,10 @@ HttpSM::update_stats()
     if (t_state.hdr_info.client_response.valid()) {
       status = t_state.hdr_info.client_response.status_get();
     }
-
+    char client_ip[INET6_ADDRSTRLEN];
+    ats_ip_ntop(&t_state.client_info.addr, client_ip, sizeof(client_ip));
     Error("[%" PRId64 "] Slow Request: "
+          "client_ip: %s:%u "
           "url: %s "
           "status: %d "
           "unique id: %s "
@@ -6656,6 +6658,8 @@ HttpSM::update_stats()
           "ua_close: %.3f "
           "sm_finish: %.3f",
           sm_id,
+          client_ip,
+          ats_ip_port_host_order(&t_state.client_info.addr),
           url_string,
           status,
           unique_id_string,