summaryrefslogtreecommitdiffstats
path: root/src/rgw
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-10-05 00:36:01 +0200
committerSage Weil <sage@newdream.net>2011-10-05 00:36:01 +0200
commit1433861531efab5b58a76610b987509505eae032 (patch)
tree8e3b60a0e4b843d29dc28574af4ec810e439b560 /src/rgw
parentrgw: RGW_LOG -> dout (diff)
downloadceph-1433861531efab5b58a76610b987509505eae032.tar.xz
ceph-1433861531efab5b58a76610b987509505eae032.zip
rgw: set dout condvar to rgw_log
We would normally set DOUT_SUBSYS and get debug_$foo, but the setting in this case is rgw_log. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/rgw')
-rw-r--r--src/rgw/librgw.cc3
-rw-r--r--src/rgw/rgw_access.cc3
-rw-r--r--src/rgw/rgw_acl.cc3
-rw-r--r--src/rgw/rgw_aclparser.cc3
-rw-r--r--src/rgw/rgw_admin.cc2
-rw-r--r--src/rgw/rgw_bucket.cc2
-rw-r--r--src/rgw/rgw_cache.cc3
-rw-r--r--src/rgw/rgw_common.cc3
-rw-r--r--src/rgw/rgw_env.cc3
-rw-r--r--src/rgw/rgw_formats.cc3
-rw-r--r--src/rgw/rgw_fs.cc3
-rw-r--r--src/rgw/rgw_log.cc3
-rw-r--r--src/rgw/rgw_main.cc6
-rw-r--r--src/rgw/rgw_multi.cc3
-rw-r--r--src/rgw/rgw_multiparser.cc3
-rw-r--r--src/rgw/rgw_op.cc11
-rw-r--r--src/rgw/rgw_rados.cc3
-rw-r--r--src/rgw/rgw_rest.cc2
-rw-r--r--src/rgw/rgw_rest_s3.cc2
-rw-r--r--src/rgw/rgw_rest_swift.cc3
-rw-r--r--src/rgw/rgw_swift.cc2
-rw-r--r--src/rgw/rgw_swift_auth.cc3
-rw-r--r--src/rgw/rgw_tools.cc3
-rw-r--r--src/rgw/rgw_user.cc3
-rw-r--r--src/rgw/rgw_xml.cc3
25 files changed, 73 insertions, 8 deletions
diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc
index 9c82db99587..87021159aac 100644
--- a/src/rgw/librgw.cc
+++ b/src/rgw/librgw.cc
@@ -25,6 +25,9 @@
#include <sstream>
#include <string.h>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
int librgw_create(librgw_t *rgw, const char * const id)
{
CephInitParameters iparams(CEPH_ENTITY_TYPE_CLIENT);
diff --git a/src/rgw/rgw_access.cc b/src/rgw/rgw_access.cc
index 83d94d7d286..4a5d2542b34 100644
--- a/src/rgw/rgw_access.cc
+++ b/src/rgw/rgw_access.cc
@@ -4,6 +4,9 @@
#include "rgw_rados.h"
#include "rgw_cache.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
static RGWCache<RGWFS> cached_fs_provider;
static RGWCache<RGWRados> cached_rados_provider;
static RGWFS fs_provider;
diff --git a/src/rgw/rgw_acl.cc b/src/rgw/rgw_acl.cc
index bf8c95fd465..7ee2719dd56 100644
--- a/src/rgw/rgw_acl.cc
+++ b/src/rgw/rgw_acl.cc
@@ -8,6 +8,9 @@
#include "rgw_acl.h"
#include "rgw_user.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
static string rgw_uri_all_users = RGW_URI_ALL_USERS;
diff --git a/src/rgw/rgw_aclparser.cc b/src/rgw/rgw_aclparser.cc
index 906450d73c1..9d35f9e5925 100644
--- a/src/rgw/rgw_aclparser.cc
+++ b/src/rgw/rgw_aclparser.cc
@@ -7,6 +7,9 @@
#include <iostream>
#include <map>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
int main(int argc, char **argv) {
RGWACLXMLParser parser;
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index 3b21ee538b1..ba732f7e59f 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -21,6 +21,8 @@ using namespace std;
#include "rgw_formats.h"
#include "auth/Crypto.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
#define SECRET_KEY_LEN 40
#define PUBLIC_ID_LEN 20
diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc
index 9c080243e31..beddf015261 100644
--- a/src/rgw/rgw_bucket.cc
+++ b/src/rgw/rgw_bucket.cc
@@ -10,6 +10,8 @@
#include "auth/Crypto.h" // get_random_bytes()
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
static rgw_bucket pi_buckets(BUCKETS_POOL_NAME);
diff --git a/src/rgw/rgw_cache.cc b/src/rgw/rgw_cache.cc
index d21245b2f55..dbc8a714787 100644
--- a/src/rgw/rgw_cache.cc
+++ b/src/rgw/rgw_cache.cc
@@ -2,6 +2,9 @@
#include <errno.h>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc
index fdea383e47a..dec537950c0 100644
--- a/src/rgw/rgw_common.cc
+++ b/src/rgw/rgw_common.cc
@@ -12,6 +12,9 @@
#include <sstream>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace ceph::crypto;
rgw_err::
diff --git a/src/rgw/rgw_env.cc b/src/rgw/rgw_env.cc
index 3bbce256583..3496bedecbe 100644
--- a/src/rgw/rgw_env.cc
+++ b/src/rgw/rgw_env.cc
@@ -4,6 +4,9 @@
#include <string>
#include <map>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
RGWEnv::RGWEnv()
{
conf = new RGWConf;
diff --git a/src/rgw/rgw_formats.cc b/src/rgw/rgw_formats.cc
index 37526a93665..32e2a6a1b42 100644
--- a/src/rgw/rgw_formats.cc
+++ b/src/rgw/rgw_formats.cc
@@ -19,6 +19,9 @@
#define LARGE_SIZE 8192
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
RGWFormatter_Plain::RGWFormatter_Plain()
: buf(NULL), len(0), max_len(0), min_stack_level(0)
{
diff --git a/src/rgw/rgw_fs.cc b/src/rgw/rgw_fs.cc
index 938119b242f..e04c3d3452a 100644
--- a/src/rgw/rgw_fs.cc
+++ b/src/rgw/rgw_fs.cc
@@ -18,6 +18,9 @@
#include <vector>
#include <map>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
struct rgwfs_state {
diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc
index 71b16dec8c4..27659c2a985 100644
--- a/src/rgw/rgw_log.cc
+++ b/src/rgw/rgw_log.cc
@@ -5,6 +5,9 @@
#include "rgw_access.h"
#include "rgw_bucket.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
static rgw_bucket log_bucket(RGW_LOG_POOL_NAME);
static void set_param_str(struct req_state *s, const char *name, string& str)
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc
index 7e207e2c176..5244590336e 100644
--- a/src/rgw/rgw_main.cc
+++ b/src/rgw/rgw_main.cc
@@ -37,6 +37,9 @@
#include "include/types.h"
#include "common/BackTrace.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
static sighandler_t sighandler_usr1;
@@ -160,6 +163,7 @@ void RGWProcess::handle_request(FCGX_Request *fcgx)
RGWEnv rgw_env;
dout(0) << "====== starting new request fcgx=" << hex << fcgx << dec << " =====" << dendl;
+ dout(0) << "rgw_log = " << g_conf->rgw_log << dendl;
rgw_env.init(fcgx->envp);
@@ -258,6 +262,8 @@ int main(int argc, const char **argv)
sighandler_usr1 = signal(SIGUSR1, godown_handler);
sighandler_alrm = signal(SIGALRM, godown_alarm);
+ dout(0) << "rgw_log = " << g_conf->rgw_log << dendl;
+
FCGX_Init();
RGWStoreManager store_manager;
diff --git a/src/rgw/rgw_multi.cc b/src/rgw/rgw_multi.cc
index a245a0e9c34..47456756a00 100644
--- a/src/rgw/rgw_multi.cc
+++ b/src/rgw/rgw_multi.cc
@@ -8,6 +8,9 @@
#include "rgw_xml.h"
#include "rgw_multi.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
diff --git a/src/rgw/rgw_multiparser.cc b/src/rgw/rgw_multiparser.cc
index a1be73f4b20..72b3bf04501 100644
--- a/src/rgw/rgw_multiparser.cc
+++ b/src/rgw/rgw_multiparser.cc
@@ -7,6 +7,9 @@
#include "rgw_multi.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
int main(int argc, char **argv) {
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 6e0f9920ebf..a5515a243a8 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -18,6 +18,9 @@
#include "rgw_log.h"
#include "rgw_multi.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
using ceph::crypto::MD5;
@@ -1492,14 +1495,6 @@ int RGWHandler::init(struct req_state *_s, FCGX_Request *fcgx)
{
s = _s;
- RGWConf *conf = s->env->conf;
-
- if (conf->log_level >= 0) {
- char buf[32];
- snprintf(buf, sizeof(buf), "%d", conf->log_level);
- g_conf->set_val("rgw_log", buf);
- g_conf->apply_changes(NULL);
- }
if (g_conf->rgw_log >= 20) {
char *p;
for (int i=0; (p = fcgx->envp[i]); ++i) {
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 588de6da2ad..3b486b621ac 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -19,6 +19,9 @@ using namespace librados;
#include <list>
#include <map>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
Rados *rados = NULL;
diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc
index ff4cf23a976..b08efd87808 100644
--- a/src/rgw/rgw_rest.cc
+++ b/src/rgw/rgw_rest.cc
@@ -13,6 +13,8 @@
#include "rgw_formats.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
static void dump_status(struct req_state *s, const char *status)
{
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
index 52ace0a69da..d90b4c93da9 100644
--- a/src/rgw/rgw_rest_s3.cc
+++ b/src/rgw/rgw_rest_s3.cc
@@ -10,6 +10,8 @@
#include "common/armor.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
using namespace ceph::crypto;
diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc
index fb3a0df172b..c8ef0d85d25 100644
--- a/src/rgw/rgw_rest_swift.cc
+++ b/src/rgw/rgw_rest_swift.cc
@@ -5,6 +5,9 @@
#include <sstream>
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
void RGWListBuckets_REST_SWIFT::send_response()
{
set_req_state_err(s, ret);
diff --git a/src/rgw/rgw_swift.cc b/src/rgw/rgw_swift.cc
index 9e641d67a89..b4c83f4aa38 100644
--- a/src/rgw/rgw_swift.cc
+++ b/src/rgw/rgw_swift.cc
@@ -10,6 +10,8 @@
#include "rgw_swift_auth.h"
#include "rgw_user.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
static size_t read_http_header(void *ptr, size_t size, size_t nmemb, void *_info)
{
diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc
index 9de5f591855..256c7b7b39b 100644
--- a/src/rgw/rgw_swift_auth.cc
+++ b/src/rgw/rgw_swift_auth.cc
@@ -6,6 +6,9 @@
#include "auth/Crypto.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace ceph::crypto;
static RGW_SWIFT_Auth_Get rgw_swift_auth_get;
diff --git a/src/rgw/rgw_tools.cc b/src/rgw/rgw_tools.cc
index 639c0a9bf1e..ded6308250e 100644
--- a/src/rgw/rgw_tools.cc
+++ b/src/rgw/rgw_tools.cc
@@ -9,6 +9,9 @@
#include "rgw_tools.h"
#include "rgw_bucket.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
#define READ_CHUNK_LEN (16 * 1024)
int rgw_put_obj(string& uid, rgw_bucket& bucket, string& oid, const char *data, size_t size)
diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc
index 0ac67f2ea06..0e821a010b8 100644
--- a/src/rgw/rgw_user.cc
+++ b/src/rgw/rgw_user.cc
@@ -11,6 +11,9 @@
#include "rgw_user.h"
#include "rgw_bucket.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
static rgw_bucket ui_key_bucket(USER_INFO_POOL_NAME);
diff --git a/src/rgw/rgw_xml.cc b/src/rgw/rgw_xml.cc
index c96e91bbe67..c47368e4716 100644
--- a/src/rgw/rgw_xml.cc
+++ b/src/rgw/rgw_xml.cc
@@ -8,6 +8,9 @@
#include "rgw_common.h"
#include "rgw_xml.h"
+#undef DOUT_CONDVAR
+#define DOUT_CONDVAR(cct, x) cct->_conf->rgw_log
+
using namespace std;
XMLObjIter::