You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2019/07/03 02:51:10 UTC

[trafficserver] branch h2_log_errors_with_code created (now 37f5b33)

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a change to branch h2_log_errors_with_code
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


      at 37f5b33  Print error code as hex decimal

This branch includes the following new commits:

     new 37f5b33  Print error code as hex decimal

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[trafficserver] 01/01: Print error code as hex decimal

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch h2_log_errors_with_code
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 37f5b33cef71f9104692174e49f720d3f1b8abe0
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Jul 3 11:50:14 2019 +0900

    Print error code as hex decimal
---
 proxy/http2/Http2ConnectionState.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 94d49ac..692544f 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -970,8 +970,8 @@ Http2ConnectionState::main_event_handler(int event, void *edata)
       const char *client_ip = ats_ip_ntop(ua_session->get_client_addr(), ipb, sizeof(ipb));
       if (error.cls == Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION) {
         if (error.msg) {
-          Error("HTTP/2 connection error code=%d client_ip=%s session_id=%" PRId64 " stream_id=%u %s", static_cast<int>(error.code),
-                client_ip, ua_session->connection_id(), stream_id, error.msg);
+          Error("HTTP/2 connection error code=0x%0x client_ip=%s session_id=%" PRId64 " stream_id=%u %s",
+                static_cast<int>(error.code), client_ip, ua_session->connection_id(), stream_id, error.msg);
         }
         this->send_goaway_frame(this->latest_streamid_in, error.code);
         this->ua_session->set_half_close_local_flag(true);
@@ -983,7 +983,7 @@ Http2ConnectionState::main_event_handler(int event, void *edata)
         // The Http2ClientSession will shutdown because connection_state.is_state_closed() will be true
       } else if (error.cls == Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM) {
         if (error.msg) {
-          Error("HTTP/2 stream error code=%d client_ip=%s session_id=%" PRId64 " stream_id=%u %s", static_cast<int>(error.code),
+          Error("HTTP/2 stream error code=0x%0x client_ip=%s session_id=%" PRId64 " stream_id=%u %s", static_cast<int>(error.code),
                 client_ip, ua_session->connection_id(), stream_id, error.msg);
         }
         this->send_rst_stream_frame(stream_id, error.code);