From: Abhishek Lekshmanan Date: Fri, 17 Feb 2017 17:07:02 +0000 (+0100) Subject: rgw: don't log the client env_map twice X-Git-Tag: v12.0.1~28^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f01518685d4d9948b5df1dac2c6a7ae6ee054d7c;p=ceph-ci.git rgw: don't log the client env_map twice We currently log the client HTTP env vars twice, once while the env map is being set and second when the client_io is initiated, this commit avoids the redundant logging while setting the map Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_client_io.cc b/src/rgw/rgw_client_io.cc index 21c9096c44e..e1dcb02e94f 100644 --- a/src/rgw/rgw_client_io.cc +++ b/src/rgw/rgw_client_io.cc @@ -16,11 +16,10 @@ void BasicClient::init(CephContext *cct) { init_env(cct); if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) { - std::map& env_map = get_env().get_map(); - std::map::iterator iter; + const auto& env_map = get_env().get_map(); - for (iter = env_map.begin(); iter != env_map.end(); ++iter) { - ldout(cct, 20) << iter->first << "=" << iter->second << dendl; + for (const auto& iter: env_map) { + ldout(cct, 20) << iter.first << "=" << iter.second << dendl; } } } diff --git a/src/rgw/rgw_env.cc b/src/rgw/rgw_env.cc index 00940670ae3..183ce6a63fc 100644 --- a/src/rgw/rgw_env.cc +++ b/src/rgw/rgw_env.cc @@ -19,8 +19,6 @@ void RGWEnv::init(CephContext *cct) void RGWEnv::set(const boost::string_ref& name, const boost::string_ref& val) { env_map[std::string{name}] = std::string{val}; - - dout(20) << "RGWEnv::set(): " << name << ": " << val << dendl; } void RGWEnv::init(CephContext *cct, char **envp)