From: Casey Bodley Date: Thu, 5 May 2022 15:36:34 +0000 (-0400) Subject: rgw: add 'rgw_access' log subsys for frontend http access log X-Git-Tag: v18.0.0~734^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f6565dfef67a5876331a836ade59f230080c7982;p=ceph-ci.git rgw: add 'rgw_access' log subsys for frontend http access log this allows the log level of this http access log to be configured separately from the 'rgw' subsystem, though the defaults are the same Fixes: https://tracker.ceph.com/issues/54405 Signed-off-by: Casey Bodley --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index b6bb34ea75e..e5ae265d979 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -43,6 +43,9 @@ * system * truncated * user_stats_sync +* RGW: The beast frontend's HTTP access log line uses a new debug_rgw_access + configurable. This has the same defaults as debug_rgw, but can now be controlled + independently. >=17.2.1 diff --git a/src/common/subsys.h b/src/common/subsys.h index 7155ca7c3d5..a1d95722b30 100644 --- a/src/common/subsys.h +++ b/src/common/subsys.h @@ -61,6 +61,7 @@ SUBSYS(perfcounter, 1, 5) SUBSYS(rgw, 1, 5) // log level for the Rados gateway SUBSYS(rgw_sync, 1, 5) SUBSYS(rgw_datacache, 1, 5) +SUBSYS(rgw_access, 1, 5) SUBSYS(javaclient, 1, 5) SUBSYS(asok, 1, 5) SUBSYS(throttle, 1, 1) diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 2d6e3a3259e..5bd6bd1adc1 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -273,7 +273,7 @@ void handle_connection(boost::asio::io_context& context, if (cct->_conf->subsys.should_gather(dout_subsys, 1)) { // access log line elements begin per Apache Combined Log Format with additions following - ldout(cct, 1) << "beast: " << std::hex << &req << std::dec << ": " + lsubdout(cct, rgw_access, 1) << "beast: " << std::hex << &req << std::dec << ": " << remote_endpoint.address() << " - " << user << " [" << log_apache_time{started} << "] \"" << message.method_string() << ' ' << message.target() << ' ' << http_version{message.version()} << "\" " << http_ret << ' '