]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: don't log the client env_map twice
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 17 Feb 2017 17:07:02 +0000 (18:07 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 17 Feb 2017 17:07:02 +0000 (18:07 +0100)
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 <abhishek@suse.com>
src/rgw/rgw_client_io.cc
src/rgw/rgw_env.cc

index 21c9096c44e5a3bfa1b82cba6b61ad12cf601c47..e1dcb02e94fe522b446a17ed30fc33c6e0a44f3d 100644 (file)
@@ -16,11 +16,10 @@ void BasicClient::init(CephContext *cct) {
   init_env(cct);
 
   if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
-    std::map<string, string, ltstr_nocase>& env_map = get_env().get_map();
-    std::map<string, string, ltstr_nocase>::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;
     }
   }
 }
index 00940670ae367793237cd1c2c6aaae63236d96bb..183ce6a63fc5ee2b6915ec048ccae4630a19e930 100644 (file)
@@ -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)