dout_subsys should strictly be defined in .cc files. There was a
definition of dout_subsys in rgw_log.h, which is included in a variety
of .cc files due to transitive includes. When a subsystem wants a
conflicting definition, a compiler warning is then generated due to
the redefinition of dout_subsys.
The definition is removed from rgw_log.h and follow-on fixes are made.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
return 0;
}
+unsigned OpsLogFile::get_subsys() const {
+ return dout_subsys;
+}
+
JsonOpsLogSink::JsonOpsLogSink() {
formatter = new JSONFormatter;
}
f->dump_string("trans_id", trans_id);
f->dump_unsigned("identity_type", identity_type);
}
-
#include <vector>
#include <fstream>
-#define dout_subsys ceph_subsys_rgw
-
namespace rgw { namespace sal {
class Store;
} }
OpsLogFile(CephContext* cct, std::string& path, uint64_t max_data_size);
~OpsLogFile() override;
CephContext *get_cct() const override { return cct; }
- unsigned get_subsys() const override { return dout_subsys; }
+ unsigned get_subsys() const override;
std::ostream& gen_prefix(std::ostream& out) const override { return out << "rgw OpsLogFile: "; }
void reopen();
void start();
#include "rgw_s3select_private.h"
+#define dout_subsys ceph_subsys_rgw
+
namespace rgw::s3select {
RGWOp* create_s3select_op()
{