#include "include/uuid.h"
namespace ceph {
-namespace log {
+namespace logging {
Graylog::Graylog(const SubsystemMap * const s, std::string logger)
: m_subs(s),
}
}
-} // ceph::log::
+} // ceph::logging::
} // ceph::
class Formatter;
-namespace log {
+namespace logging {
struct Entry;
class SubsystemMap;
set_log_prio(prio);
if (to_graylog && !graylog) { /* should but isn't */
- graylog = ceph::log::Graylog::Ref(new ceph::log::Graylog("clog"));
+ graylog = ceph::logging::Graylog::Ref(new ceph::logging::Graylog("clog"));
} else if (!to_graylog && graylog) { /* shouldn't but is */
graylog.reset();
}
class LogChannel;
namespace ceph {
-namespace log {
+namespace logging {
class Graylog;
}
}
std::string syslog_facility;
bool log_to_syslog;
bool log_to_monitors;
- shared_ptr<ceph::log::Graylog> graylog;
+ shared_ptr<ceph::logging::Graylog> graylog;
friend class LogClientTemp;
* logging-related config changes to the log.
*/
class LogObs : public md_config_obs_t {
- ceph::log::Log *log;
+ ceph::logging::Log *log;
public:
- explicit LogObs(ceph::log::Log *l) : log(l) {}
+ explicit LogObs(ceph::logging::Log *l) : log(l) {}
const char** get_tracked_conf_keys() const {
static const char *KEYS[] = {
ceph_spin_init(&_feature_lock);
ceph_spin_init(&_cct_perf_lock);
- _log = new ceph::log::Log(&_conf->subsys);
+ _log = new ceph::logging::Log(&_conf->subsys);
_log->start();
_log_obs = new LogObs(_log);
namespace ceph {
class PluginRegistry;
class HeartbeatMap;
- namespace log {
+ namespace logging {
class Log;
}
}
void put();
md_config_t *_conf;
- ceph::log::Log *_log;
+ ceph::logging::Log *_log;
/* init ceph::crypto */
void init_crypto();
changed_set_t changed;
public:
- ceph::log::SubsystemMap subsys;
+ ceph::logging::SubsystemMap subsys;
EntityName name;
string data_dir_option; ///< data_dir config option, if any
char __array[((v >= -1) && (v <= 200)) ? 0 : -1] __attribute__((unused)); \
} \
static size_t _log_exp_length=80; \
- ceph::log::Entry *_dout_e = cct->_log->create_entry(v, sub, &_log_exp_length); \
+ ceph::logging::Entry *_dout_e = cct->_log->create_entry(v, sub, &_log_exp_length); \
ostream _dout_os(&_dout_e->m_streambuf); \
CephContext *_dout_cct = cct; \
std::ostream* _dout = &_dout_os;
namespace ceph {
-namespace log {
+namespace logging {
struct Entry {
utime_t m_stamp;
#include "Entry.h"
namespace ceph {
-namespace log {
+namespace logging {
struct EntryQueue {
int m_len;
namespace ceph {
-namespace log {
+namespace logging {
static OnExitManager exit_callbacks;
m_inject_segv = true;
}
-} // ceph::log::
+} // ceph::logging::
} // ceph::
#include "EntryQueue.h"
namespace ceph {
-namespace log {
+namespace logging {
class Graylog;
class SubsystemMap;
#include "SubsystemMap.h"
namespace ceph {
-namespace log {
+namespace logging {
void SubsystemMap::add(unsigned subsys, std::string name, int log, int gather)
{
#include "include/assert.h"
namespace ceph {
-namespace log {
+namespace logging {
struct Subsystem {
int log_level, gather_level;
#include "common/PrebufferedStreambuf.h"
#include "SubsystemMap.h"
-using namespace ceph::log;
+using namespace ceph::logging;
TEST(Log, Simple)
{
}
if (channels.do_log_to_graylog(channel)) {
- ceph::log::Graylog::Ref graylog = channels.get_graylog(channel);
+ ceph::logging::Graylog::Ref graylog = channels.get_graylog(channel);
if (graylog) {
graylog->log_log_entry(&le);
}
return ret;
}
-ceph::log::Graylog::Ref LogMonitor::log_channel_info::get_graylog(
+ceph::logging::Graylog::Ref LogMonitor::log_channel_info::get_graylog(
const string &channel)
{
generic_dout(25) << __func__ << " for channel '"
<< channel << "'" << dendl;
if (graylogs.count(channel) == 0) {
- ceph::log::Graylog::Ref graylog = ceph::log::Graylog::Ref(new ceph::log::Graylog("mon"));
+ ceph::logging::Graylog::Ref graylog = ceph::logging::Graylog::Ref(new ceph::logging::Graylog("mon"));
graylog->set_fsid(g_conf->fsid);
graylog->set_hostname(g_conf->host);
static const string LOG_META_CHANNEL = "$channel";
namespace ceph {
-namespace log {
+namespace logging {
class Graylog;
}
}
map<string,string> log_to_graylog_host;
map<string,string> log_to_graylog_port;
- map<string, shared_ptr<ceph::log::Graylog>> graylogs;
+ map<string, shared_ptr<ceph::logging::Graylog>> graylogs;
uuid_d fsid;
string host;
&CLOG_CONFIG_DEFAULT_KEY) == "true");
}
- shared_ptr<ceph::log::Graylog> get_graylog(const string &channel);
+ shared_ptr<ceph::logging::Graylog> get_graylog(const string &channel);
} channels;
void update_log_channels();