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>
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;
}
}
}
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)