ret = rgw_add_bucket(user_id, bucket);
- RGW_LOG(0) << "ret=" << ret << dendl;
+ RGW_LOG(20) << "ret=" << ret << dendl;
if (ret == -EEXIST)
ret = 0;
{
map<string, ObjectCacheEntry>::iterator iter = cache_map.find(name);
if (iter == cache_map.end()) {
- RGW_LOG(0) << "cache get: name=" << name << " : miss" << dendl;
+ RGW_LOG(10) << "cache get: name=" << name << " : miss" << dendl;
return -ENOENT;
}
ObjectCacheInfo& src = iter->second.info;
if ((src.flags & mask) != mask) {
- RGW_LOG(0) << "cache get: name=" << name << " : type miss (requested=" << mask << ", cached=" << src.flags << dendl;
+ RGW_LOG(10) << "cache get: name=" << name << " : type miss (requested=" << mask << ", cached=" << src.flags << dendl;
return -ENOENT;
}
- RGW_LOG(0) << "cache get: name=" << name << " : hit" << dendl;
+ RGW_LOG(10) << "cache get: name=" << name << " : hit" << dendl;
info = src;
void ObjectCache::put(string& name, ObjectCacheInfo& info)
{
- RGW_LOG(0) << "cache put: name=" << name << dendl;
+ RGW_LOG(10) << "cache put: name=" << name << dendl;
map<string, ObjectCacheEntry>::iterator iter = cache_map.find(name);
if (iter == cache_map.end()) {
ObjectCacheEntry entry;
bool _enqueue(FCGX_Request *req) {
process->m_fcgx_queue.push_back(req);
- RGW_LOG(0) << "enqueued request fcgx=" << hex << req << dec << dendl;
+ RGW_LOG(20) << "enqueued request fcgx=" << hex << req << dec << dendl;
_dump_queue();
return true;
}
return NULL;
FCGX_Request *req = process->m_fcgx_queue.front();
process->m_fcgx_queue.pop_front();
- RGW_LOG(0) << "dequeued request fcgx=" << hex << req << dec << dendl;
+ RGW_LOG(20) << "dequeued request fcgx=" << hex << req << dec << dendl;
_dump_queue();
return req;
}
void _dump_queue() {
deque<FCGX_Request *>::iterator iter;
if (process->m_fcgx_queue.size() == 0) {
- RGW_LOG(0) << "RGWWQ: empty" << dendl;
+ RGW_LOG(20) << "RGWWQ: empty" << dendl;
return;
}
- RGW_LOG(0) << "RGWWQ:" << dendl;
+ RGW_LOG(20) << "RGWWQ:" << dendl;
for (iter = process->m_fcgx_queue.begin(); iter != process->m_fcgx_queue.end(); ++iter) {
- RGW_LOG(0) << "fcgx: " << hex << *iter << dec << dendl;
+ RGW_LOG(20) << "fcgx: " << hex << *iter << dec << dendl;
}
}
void _clear() {
for (;;) {
FCGX_Request *fcgx = new FCGX_Request;
- RGW_LOG(0) << "allocated request fcgx=" << hex << fcgx << dec << dendl;
+ RGW_LOG(10) << "allocated request fcgx=" << hex << fcgx << dec << dendl;
FCGX_InitRequest(fcgx, s, 0);
int ret = FCGX_Accept_r(fcgx);
if (ret < 0)
dest_owner.set_id(owner->get_id());
dest_owner.set_name(owner_info.display_name);
- RGW_LOG(0) << "owner id=" << owner->get_id() << dendl;
- RGW_LOG(0) << "dest owner id=" << dest.get_owner().get_id() << dendl;
+ RGW_LOG(20) << "owner id=" << owner->get_id() << dendl;
+ RGW_LOG(20) << "dest owner id=" << dest.get_owner().get_id() << dendl;
RGWAccessControlList& src_acl = src.get_acl();
RGWAccessControlList& acl = dest.get_acl();
goto done;
}
if (iter->second.compare(obj_iter->second.etag) != 0) {
- RGW_LOG(0) << "part: " << iter->first << " etag: " << iter->second << dendl;
+ RGW_LOG(0) << "etag mismatch: part: " << iter->first << " etag: " << iter->second << dendl;
ret = -ERR_INVALID_PART;
goto done;
}
buf_to_hex((unsigned char *)final_etag, sizeof(final_etag), final_etag_str);
snprintf(&final_etag_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2], sizeof(final_etag_str) - CEPH_CRYPTO_MD5_DIGESTSIZE * 2,
"-%lld", (long long)parts->parts.size());
- RGW_LOG(0) << "calculated etag: " << final_etag_str << dendl;
+ RGW_LOG(10) << "calculated etag: " << final_etag_str << dendl;
etag_bl.append(final_etag_str, strlen(final_etag_str) + 1);
string openstack_user = s->os_user;
- RGW_LOG(0) << "openstack user=" << s->os_user << dendl;
+ RGW_LOG(10) << "openstack user=" << s->os_user << dendl;
if (rgw_get_user_info_by_openstack(openstack_user, s->user) < 0) {
RGW_LOG(0) << "couldn't map openstack user" << dendl;
return false;
}
- RGW_LOG(0) << "user_id=" << s->user.user_id << dendl;
+ RGW_LOG(10) << "user_id=" << s->user.user_id << dendl;
return true;
}
int len = strlen(token);
if (len & 1) {
- RGW_LOG(0) << "invalid token length" << dendl;
+ RGW_LOG(0) << "failed to verify token: invalid token length len=" << len << dendl;
return -EINVAL;
}
::decode(nonce, iter);
::decode(expiration, iter);
} catch (buffer::error *err) {
- RGW_LOG(0) << "failed to decode token" << dendl;
+ RGW_LOG(0) << "failed to decode token: caught exception" << dendl;
return -EINVAL;
}
if (expiration < ceph_clock_now(g_ceph_context)) {
if ((ret = rgw_get_user_info_by_openstack(os_user, info)) < 0)
return ret;
- RGW_LOG(0) << "os_user=" << os_user << dendl;
+ RGW_LOG(10) << "os_user=" << os_user << dendl;
bufferlist tok;
ret = build_token(os_user, info.openstack_key, nonce, expiration, tok);
if (memcmp(tok.c_str(), bl.c_str(), tok.length()) != 0) {
char buf[tok.length() * 2 + 1];
buf_to_hex((const unsigned char *)tok.c_str(), tok.length(), buf);
- RGW_LOG(0) << "tokens mismatch tok=" << buf << dendl;
+ RGW_LOG(0) << "WARNING: tokens mismatch tok=" << buf << dendl;
return -EPERM;
}
{
int ret = -EPERM;
- RGW_LOG(0) << "RGW_OS_Auth_Get::execute()" << dendl;
+ RGW_LOG(20) << "RGW_OS_Auth_Get::execute()" << dendl;
const char *key = s->env->get("HTTP_X_AUTH_KEY");
const char *user = s->env->get("HTTP_X_AUTH_USER");
int RGWRados::distribute(bufferlist& bl)
{
- RGW_LOG(0) << "sending notification oid=" << notify_oid << " bl.length()=" << bl.length() << dendl;
+ RGW_LOG(10) << "distributing notification oid=" << notify_oid << " bl.length()=" << bl.length() << dendl;
int r = control_pool_ctx.notify(notify_oid, 0, bl);
return r;
}
time_t req_sec = s->header_time.sec();
if (req_sec < now - RGW_AUTH_GRACE_MINS * 60 ||
req_sec > now + RGW_AUTH_GRACE_MINS * 60) {
- RGW_LOG(0) << "req_sec=" << req_sec << " now=" << now << "; now - RGW_AUTH_GRACE_MINS=" << now - RGW_AUTH_GRACE_MINS * 60 << "; now + RGW_AUTH_GRACE_MINS=" << now + RGW_AUTH_GRACE_MINS * 60 << dendl;
+ RGW_LOG(10) << "req_sec=" << req_sec << " now=" << now << "; now - RGW_AUTH_GRACE_MINS=" << now - RGW_AUTH_GRACE_MINS * 60 << "; now + RGW_AUTH_GRACE_MINS=" << now + RGW_AUTH_GRACE_MINS * 60 << dendl;
RGW_LOG(0) << "request time skew too big now=" << utime_t(now, 0) << " req_time=" << s->header_time << dendl;
return -ERR_REQUEST_TIME_SKEWED;
}