Optionally send cluster log messages to stderr (prefixed by the
channel).
Signed-off-by: Sage Weil <sage@redhat.com>
.set_default("12201")
.set_description(""),
+ Option("mon_cluster_log_to_stderr", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_description("Send cluster log messages to stderr (prefixed by channel)"),
+
Option("mon_cluster_log_to_syslog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
.set_default("default=false")
.set_description(""),
if (channel.empty()) // keep retrocompatibility
channel = CLOG_CHANNEL_CLUSTER;
+ if (g_conf->get_val<bool>("mon_cluster_log_to_stderr")) {
+ cerr << channel << " " << le << std::endl;
+ }
+
if (channels.do_log_to_syslog(channel)) {
string level = channels.get_level(channel);
string facility = channels.get_facility(channel);