OPTION(rgw_maintenance_tick_interval, OPT_DOUBLE, 10.0),
OPTION(rgw_pools_preallocate_max, OPT_INT, 100),
OPTION(rgw_pools_preallocate_threshold, OPT_INT, 70),
+ OPTION(rgw_log_nonexistent_bucket, OPT_BOOL, false),
// see config.h
OPTION(internal_safe_to_start_threads, OPT_BOOL, false),
double rgw_maintenance_tick_interval;
int rgw_pools_preallocate_max;
int rgw_pools_preallocate_threshold;
+ bool rgw_log_nonexistent_bucket;
// This will be set to true when it is safe to start threads.
// Once it is true, it will never change.
int rgw_log_op(struct req_state *s)
{
struct rgw_log_entry entry;
+ uint64_t pool_id;
if (!s->should_log)
return 0;
return -EINVAL;
}
if (s->err.ret == -ERR_NO_SUCH_BUCKET) {
- RGW_LOG(0) << "bucket " << s->bucket << " doesn't exist, not logging" << dendl;
- return 0;
+ if (!g_conf->rgw_log_nonexistent_bucket) {
+ RGW_LOG(0) << "bucket " << s->bucket << " doesn't exist, not logging" << dendl;
+ return 0;
+ }
+ pool_id = 0;
+ } else {
+ pool_id = s->pool_id;
}
entry.bucket = s->bucket_name;
entry.http_status = "200"; // default
entry.error_code = s->err.s3_code;
- entry.pool_id = s->pool_id;
+ entry.pool_id = pool_id;
bufferlist bl;
::encode(entry, bl);