1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #include <boost/algorithm/string/predicate.hpp>
20 #include "LogMonitor.h"
22 #include "MonitorDBStore.h"
24 #include "messages/MMonCommand.h"
25 #include "messages/MLog.h"
26 #include "messages/MLogAck.h"
27 #include "common/Graylog.h"
28 #include "common/errno.h"
29 #include "common/strtol.h"
30 #include "include/assert.h"
31 #include "include/str_list.h"
32 #include "include/str_map.h"
33 #include "include/compat.h"
35 #define dout_subsys ceph_subsys_mon
37 #define dout_prefix _prefix(_dout, mon, get_last_committed())
38 static ostream
& _prefix(std::ostream
*_dout
, Monitor
*mon
, version_t v
) {
39 return *_dout
<< "mon." << mon
->name
<< "@" << mon
->rank
40 << "(" << mon
->get_state_name()
41 << ").log v" << v
<< " ";
44 ostream
& operator<<(ostream
&out
, const LogMonitor
&pm
)
50 Tick function to update the map based on performance every N seconds
53 void LogMonitor::tick()
55 if (!is_active()) return;
57 dout(10) << *this << dendl
;
61 void LogMonitor::create_initial()
63 dout(10) << "create_initial -- creating initial map" << dendl
;
65 e
.name
= g_conf
->name
;
66 e
.stamp
= ceph_clock_now();
69 ss
<< "mkfs " << mon
->monmap
->get_fsid();
72 pending_log
.insert(pair
<utime_t
,LogEntry
>(e
.stamp
, e
));
75 void LogMonitor::update_from_paxos(bool *need_bootstrap
)
77 dout(10) << __func__
<< dendl
;
78 version_t version
= get_last_committed();
79 dout(10) << __func__
<< " version " << version
80 << " summary v " << summary
.version
<< dendl
;
81 if (version
== summary
.version
)
83 assert(version
>= summary
.version
);
85 map
<string
,bufferlist
> channel_blog
;
87 version_t latest_full
= get_version_latest_full();
88 dout(10) << __func__
<< " latest full " << latest_full
<< dendl
;
89 if ((latest_full
> 0) && (latest_full
> summary
.version
)) {
91 get_version_full(latest_full
, latest_bl
);
92 assert(latest_bl
.length() != 0);
93 dout(7) << __func__
<< " loading summary e" << latest_full
<< dendl
;
94 bufferlist::iterator p
= latest_bl
.begin();
96 dout(7) << __func__
<< " loaded summary e" << summary
.version
<< dendl
;
99 // walk through incrementals
100 while (version
> summary
.version
) {
102 int err
= get_version(summary
.version
+1, bl
);
106 bufferlist::iterator p
= bl
.begin();
112 dout(7) << "update_from_paxos applying incremental log " << summary
.version
+1 << " " << le
<< dendl
;
114 string channel
= le
.channel
;
115 if (channel
.empty()) // keep retrocompatibility
116 channel
= CLOG_CHANNEL_CLUSTER
;
118 if (g_conf
->get_val
<bool>("mon_cluster_log_to_stderr")) {
119 cerr
<< channel
<< " " << le
<< std::endl
;
122 if (channels
.do_log_to_syslog(channel
)) {
123 string level
= channels
.get_level(channel
);
124 string facility
= channels
.get_facility(channel
);
125 if (level
.empty() || facility
.empty()) {
126 derr
<< __func__
<< " unable to log to syslog -- level or facility"
127 << " not defined (level: " << level
<< ", facility: "
128 << facility
<< ")" << dendl
;
131 le
.log_to_syslog(channels
.get_level(channel
),
132 channels
.get_facility(channel
));
135 if (channels
.do_log_to_graylog(channel
)) {
136 ceph::logging::Graylog::Ref graylog
= channels
.get_graylog(channel
);
138 graylog
->log_log_entry(&le
);
140 dout(7) << "graylog: " << channel
<< " " << graylog
141 << " host:" << channels
.log_to_graylog_host
<< dendl
;
144 string log_file
= channels
.get_log_file(channel
);
145 dout(20) << __func__
<< " logging for channel '" << channel
146 << "' to file '" << log_file
<< "'" << dendl
;
148 if (!log_file
.empty()) {
149 string log_file_level
= channels
.get_log_file_level(channel
);
150 if (log_file_level
.empty()) {
151 dout(1) << __func__
<< " warning: log file level not defined for"
152 << " channel '" << channel
<< "' yet a log file is --"
153 << " will assume lowest level possible" << dendl
;
156 int min
= string_to_syslog_level(log_file_level
);
157 int l
= clog_type_to_syslog_level(le
.prio
);
162 bufferlist
&blog
= channel_blog
[channel
];
163 blog
.append(ss
.str());
171 summary
.prune(g_conf
->mon_log_max_summary
);
174 dout(15) << __func__
<< " logging for "
175 << channel_blog
.size() << " channels" << dendl
;
176 for(map
<string
,bufferlist
>::iterator p
= channel_blog
.begin();
177 p
!= channel_blog
.end(); ++p
) {
178 if (!p
->second
.length()) {
179 dout(15) << __func__
<< " channel '" << p
->first
180 << "': nothing to log" << dendl
;
184 dout(15) << __func__
<< " channel '" << p
->first
185 << "' logging " << p
->second
.length() << " bytes" << dendl
;
186 string log_file
= channels
.get_log_file(p
->first
);
188 int fd
= ::open(log_file
.c_str(), O_WRONLY
|O_APPEND
|O_CREAT
, 0600);
191 dout(1) << "unable to write to '" << log_file
<< "' for channel '"
192 << p
->first
<< "': " << cpp_strerror(err
) << dendl
;
194 int err
= p
->second
.write_fd(fd
);
196 dout(1) << "error writing to '" << log_file
<< "' for channel '"
197 << p
->first
<< ": " << cpp_strerror(err
) << dendl
;
199 VOID_TEMP_FAILURE_RETRY(::close(fd
));
206 void LogMonitor::create_pending()
209 pending_summary
= summary
;
210 dout(10) << "create_pending v " << (get_last_committed() + 1) << dendl
;
213 void LogMonitor::encode_pending(MonitorDBStore::TransactionRef t
)
215 version_t version
= get_last_committed() + 1;
217 dout(10) << __func__
<< " v" << version
<< dendl
;
220 multimap
<utime_t
,LogEntry
>::iterator p
;
221 for (p
= pending_log
.begin(); p
!= pending_log
.end(); ++p
)
222 p
->second
.encode(bl
, mon
->get_quorum_con_features());
224 put_version(t
, version
, bl
);
225 put_last_committed(t
, version
);
228 void LogMonitor::encode_full(MonitorDBStore::TransactionRef t
)
230 dout(10) << __func__
<< " log v " << summary
.version
<< dendl
;
231 assert(get_last_committed() == summary
.version
);
233 bufferlist summary_bl
;
234 ::encode(summary
, summary_bl
, mon
->get_quorum_con_features());
236 put_version_full(t
, summary
.version
, summary_bl
);
237 put_version_latest_full(t
, summary
.version
);
240 version_t
LogMonitor::get_trim_to()
242 if (!mon
->is_leader())
245 unsigned max
= g_conf
->mon_max_log_epochs
;
246 version_t version
= get_last_committed();
248 return version
- max
;
252 bool LogMonitor::preprocess_query(MonOpRequestRef op
)
254 op
->mark_logmon_event("preprocess_query");
255 PaxosServiceMessage
*m
= static_cast<PaxosServiceMessage
*>(op
->get_req());
256 dout(10) << "preprocess_query " << *m
<< " from " << m
->get_orig_source_inst() << dendl
;
257 switch (m
->get_type()) {
258 case MSG_MON_COMMAND
:
259 return preprocess_command(op
);
262 return preprocess_log(op
);
270 bool LogMonitor::prepare_update(MonOpRequestRef op
)
272 op
->mark_logmon_event("prepare_update");
273 PaxosServiceMessage
*m
= static_cast<PaxosServiceMessage
*>(op
->get_req());
274 dout(10) << "prepare_update " << *m
<< " from " << m
->get_orig_source_inst() << dendl
;
275 switch (m
->get_type()) {
276 case MSG_MON_COMMAND
:
277 return prepare_command(op
);
279 return prepare_log(op
);
286 bool LogMonitor::preprocess_log(MonOpRequestRef op
)
288 op
->mark_logmon_event("preprocess_log");
289 MLog
*m
= static_cast<MLog
*>(op
->get_req());
290 dout(10) << "preprocess_log " << *m
<< " from " << m
->get_orig_source() << dendl
;
293 MonSession
*session
= m
->get_session();
296 if (!session
->is_capable("log", MON_CAP_W
)) {
297 dout(0) << "preprocess_log got MLog from entity with insufficient privileges "
298 << session
->caps
<< dendl
;
302 for (deque
<LogEntry
>::iterator p
= m
->entries
.begin();
303 p
!= m
->entries
.end();
305 if (!pending_summary
.contains(p
->key()))
309 dout(10) << " nothing new" << dendl
;
320 struct LogMonitor::C_Log
: public C_MonOp
{
322 C_Log(LogMonitor
*p
, MonOpRequestRef o
) :
323 C_MonOp(o
), logmon(p
) {}
324 void _finish(int r
) override
{
325 if (r
== -ECANCELED
) {
328 logmon
->_updated_log(op
);
332 bool LogMonitor::prepare_log(MonOpRequestRef op
)
334 op
->mark_logmon_event("prepare_log");
335 MLog
*m
= static_cast<MLog
*>(op
->get_req());
336 dout(10) << "prepare_log " << *m
<< " from " << m
->get_orig_source() << dendl
;
338 if (m
->fsid
!= mon
->monmap
->fsid
) {
339 dout(0) << "handle_log on fsid " << m
->fsid
<< " != " << mon
->monmap
->fsid
344 for (deque
<LogEntry
>::iterator p
= m
->entries
.begin();
345 p
!= m
->entries
.end();
347 dout(10) << " logging " << *p
<< dendl
;
348 if (!pending_summary
.contains(p
->key())) {
349 pending_summary
.add(*p
);
350 pending_log
.insert(pair
<utime_t
,LogEntry
>(p
->stamp
, *p
));
353 pending_summary
.prune(g_conf
->mon_log_max_summary
);
354 wait_for_finished_proposal(op
, new C_Log(this, op
));
358 void LogMonitor::_updated_log(MonOpRequestRef op
)
360 MLog
*m
= static_cast<MLog
*>(op
->get_req());
361 dout(7) << "_updated_log for " << m
->get_orig_source_inst() << dendl
;
362 mon
->send_reply(op
, new MLogAck(m
->fsid
, m
->entries
.rbegin()->seq
));
365 bool LogMonitor::should_propose(double& delay
)
367 // commit now if we have a lot of pending events
368 if (g_conf
->mon_max_log_entries_per_event
> 0 &&
369 pending_log
.size() >= (unsigned)g_conf
->mon_max_log_entries_per_event
)
372 // otherwise fall back to generic policy
373 return PaxosService::should_propose(delay
);
377 bool LogMonitor::preprocess_command(MonOpRequestRef op
)
379 op
->mark_logmon_event("preprocess_command");
380 MMonCommand
*m
= static_cast<MMonCommand
*>(op
->get_req());
385 map
<string
, cmd_vartype
> cmdmap
;
386 if (!cmdmap_from_json(m
->cmd
, &cmdmap
, ss
)) {
387 string rs
= ss
.str();
388 mon
->reply_command(op
, -EINVAL
, rs
, get_last_committed());
391 MonSession
*session
= m
->get_session();
393 mon
->reply_command(op
, -EACCES
, "access denied", get_last_committed());
398 cmd_getval(g_ceph_context
, cmdmap
, "prefix", prefix
);
401 cmd_getval(g_ceph_context
, cmdmap
, "format", format
, string("plain"));
402 boost::scoped_ptr
<Formatter
> f(Formatter::create(format
));
404 if (prefix
== "log last") {
406 cmd_getval(g_ceph_context
, cmdmap
, "num", num
);
408 f
->open_array_section("tail");
411 std::string level_str
;
413 if (cmd_getval(g_ceph_context
, cmdmap
, "level", level_str
)) {
414 level
= LogEntry::str_to_level(level_str
);
415 if (level
== CLOG_UNKNOWN
) {
416 ss
<< "Invalid severity '" << level_str
<< "'";
417 mon
->reply_command(op
, -EINVAL
, ss
.str(), get_last_committed());
425 if (!cmd_getval(g_ceph_context
, cmdmap
, "channel", channel
)) {
426 channel
= CLOG_CHANNEL_DEFAULT
;
429 // We'll apply this twice, once while counting out lines
430 // and once while outputting them.
431 auto match
= [level
, channel
](const LogEntry
&entry
) {
432 return entry
.prio
>= level
&& (entry
.channel
== channel
|| channel
== "*");
435 auto rp
= summary
.tail
.rbegin();
436 for (; num
> 0 && rp
!= summary
.tail
.rend(); ++rp
) {
441 if (rp
== summary
.tail
.rend()) {
445 for (; rp
!= summary
.tail
.rbegin(); --rp
) {
451 f
->dump_object("entry", *rp
);
460 rdata
.append(ss
.str());
469 mon
->reply_command(op
, r
, rs
, rdata
, get_last_committed());
474 bool LogMonitor::prepare_command(MonOpRequestRef op
)
476 op
->mark_logmon_event("prepare_command");
477 MMonCommand
*m
= static_cast<MMonCommand
*>(op
->get_req());
482 map
<string
, cmd_vartype
> cmdmap
;
483 if (!cmdmap_from_json(m
->cmd
, &cmdmap
, ss
)) {
484 // ss has reason for failure
485 string rs
= ss
.str();
486 mon
->reply_command(op
, -EINVAL
, rs
, get_last_committed());
491 cmd_getval(g_ceph_context
, cmdmap
, "prefix", prefix
);
493 MonSession
*session
= m
->get_session();
495 mon
->reply_command(op
, -EACCES
, "access denied", get_last_committed());
499 if (prefix
== "log") {
500 vector
<string
> logtext
;
501 cmd_getval(g_ceph_context
, cmdmap
, "logtext", logtext
);
503 le
.who
= m
->get_orig_source_inst();
504 le
.name
= session
->entity_name
;
505 le
.stamp
= m
->get_recv_stamp();
508 le
.channel
= CLOG_CHANNEL_DEFAULT
;
509 le
.msg
= str_join(logtext
, " ");
510 pending_summary
.add(le
);
511 pending_summary
.prune(g_conf
->mon_log_max_summary
);
512 pending_log
.insert(pair
<utime_t
,LogEntry
>(le
.stamp
, le
));
513 wait_for_finished_proposal(op
, new Monitor::C_Command(
514 mon
, op
, 0, string(), get_last_committed() + 1));
519 mon
->reply_command(op
, err
, rs
, get_last_committed());
524 int LogMonitor::sub_name_to_id(const string
& n
)
526 if (n
.substr(0, 4) == "log-" && n
.size() > 4) {
527 return LogEntry::str_to_level(n
.substr(4));
533 void LogMonitor::check_subs()
535 dout(10) << __func__
<< dendl
;
536 for (map
<string
, xlist
<Subscription
*>*>::iterator i
= mon
->session_map
.subs
.begin();
537 i
!= mon
->session_map
.subs
.end();
539 for (xlist
<Subscription
*>::iterator j
= i
->second
->begin(); !j
.end(); ++j
) {
540 if (sub_name_to_id((*j
)->type
) >= 0)
546 void LogMonitor::check_sub(Subscription
*s
)
548 dout(10) << __func__
<< " client wants " << s
->type
<< " ver " << s
->next
<< dendl
;
550 int sub_level
= sub_name_to_id(s
->type
);
551 assert(sub_level
>= 0);
553 version_t summary_version
= summary
.version
;
554 if (s
->next
> summary_version
) {
555 dout(10) << __func__
<< " client " << s
->session
->inst
556 << " requested version (" << s
->next
<< ") is greater than ours ("
557 << summary_version
<< "), which means we already sent him"
558 << " everything we have." << dendl
;
562 MLog
*mlog
= new MLog(mon
->monmap
->fsid
);
565 /* First timer, heh? */
566 bool ret
= _create_sub_summary(mlog
, sub_level
);
568 dout(1) << __func__
<< " ret = " << ret
<< dendl
;
573 /* let us send you an incremental log... */
574 _create_sub_incremental(mlog
, sub_level
, s
->next
);
577 dout(1) << __func__
<< " sending message to " << s
->session
->inst
578 << " with " << mlog
->entries
.size() << " entries"
579 << " (version " << mlog
->version
<< ")" << dendl
;
581 if (!mlog
->entries
.empty()) {
582 s
->session
->con
->send_message(mlog
);
587 mon
->session_map
.remove_sub(s
);
589 s
->next
= summary_version
+1;
593 * Create a log message containing only the last message in the summary.
595 * @param mlog Log message we'll send to the client.
596 * @param level Maximum log level the client is interested in.
597 * @return 'true' if we consider we successfully populated @mlog;
600 bool LogMonitor::_create_sub_summary(MLog
*mlog
, int level
)
602 dout(10) << __func__
<< dendl
;
604 assert(mlog
!= NULL
);
606 if (!summary
.tail
.size())
609 list
<LogEntry
>::reverse_iterator it
= summary
.tail
.rbegin();
610 for (; it
!= summary
.tail
.rend(); ++it
) {
615 mlog
->entries
.push_back(e
);
616 mlog
->version
= summary
.version
;
624 * Create an incremental log message from version \p sv to \p summary.version
626 * @param mlog Log message we'll send to the client with the messages received
627 * since version \p sv, inclusive.
628 * @param level The max log level of the messages the client is interested in.
629 * @param sv The version the client is looking for.
631 void LogMonitor::_create_sub_incremental(MLog
*mlog
, int level
, version_t sv
)
633 dout(10) << __func__
<< " level " << level
<< " ver " << sv
634 << " cur summary ver " << summary
.version
<< dendl
;
636 if (sv
< get_first_committed()) {
637 dout(10) << __func__
<< " skipped from " << sv
638 << " to first_committed " << get_first_committed() << dendl
;
640 le
.stamp
= ceph_clock_now();
643 ss
<< "skipped log messages from " << sv
<< " to " << get_first_committed();
645 mlog
->entries
.push_back(le
);
646 sv
= get_first_committed();
649 version_t summary_ver
= summary
.version
;
650 while (sv
&& sv
<= summary_ver
) {
652 int err
= get_version(sv
, bl
);
655 bufferlist::iterator p
= bl
.begin();
662 if (le
.prio
< level
) {
663 dout(20) << __func__
<< " requested " << level
664 << " entry " << le
.prio
<< dendl
;
668 mlog
->entries
.push_back(le
);
670 mlog
->version
= sv
++;
673 dout(10) << __func__
<< " incremental message ready ("
674 << mlog
->entries
.size() << " entries)" << dendl
;
677 void LogMonitor::update_log_channels()
683 int r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_syslog
,
684 oss
, &channels
.log_to_syslog
,
685 CLOG_CONFIG_DEFAULT_KEY
);
687 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_syslog'" << dendl
;
691 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_syslog_level
,
692 oss
, &channels
.syslog_level
,
693 CLOG_CONFIG_DEFAULT_KEY
);
695 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_syslog_level'"
700 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_syslog_facility
,
701 oss
, &channels
.syslog_facility
,
702 CLOG_CONFIG_DEFAULT_KEY
);
704 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_syslog_facility'"
709 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_file
, oss
,
711 CLOG_CONFIG_DEFAULT_KEY
);
713 derr
<< __func__
<< " error parsing 'mon_cluster_log_file'" << dendl
;
717 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_file_level
, oss
,
718 &channels
.log_file_level
,
719 CLOG_CONFIG_DEFAULT_KEY
);
721 derr
<< __func__
<< " error parsing 'mon_cluster_log_file_level'"
726 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_graylog
, oss
,
727 &channels
.log_to_graylog
,
728 CLOG_CONFIG_DEFAULT_KEY
);
730 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_graylog'"
735 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_graylog_host
, oss
,
736 &channels
.log_to_graylog_host
,
737 CLOG_CONFIG_DEFAULT_KEY
);
739 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_graylog_host'"
744 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_graylog_port
, oss
,
745 &channels
.log_to_graylog_port
,
746 CLOG_CONFIG_DEFAULT_KEY
);
748 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_graylog_port'"
753 channels
.expand_channel_meta();
756 void LogMonitor::log_channel_info::expand_channel_meta(map
<string
,string
> &m
)
758 generic_dout(20) << __func__
<< " expand map: " << m
<< dendl
;
759 for (map
<string
,string
>::iterator p
= m
.begin(); p
!= m
.end(); ++p
) {
760 m
[p
->first
] = expand_channel_meta(p
->second
, p
->first
);
762 generic_dout(20) << __func__
<< " expanded map: " << m
<< dendl
;
765 string
LogMonitor::log_channel_info::expand_channel_meta(
767 const string
&change_to
)
769 size_t pos
= string::npos
;
771 while ((pos
= s
.find(LOG_META_CHANNEL
)) != string::npos
) {
772 string tmp
= s
.substr(0, pos
) + change_to
;
773 if (pos
+LOG_META_CHANNEL
.length() < s
.length())
774 tmp
+= s
.substr(pos
+LOG_META_CHANNEL
.length());
777 generic_dout(20) << __func__
<< " from '" << input
778 << "' to '" << s
<< "'" << dendl
;
783 bool LogMonitor::log_channel_info::do_log_to_syslog(const string
&channel
) {
784 string v
= get_str_map_key(log_to_syslog
, channel
,
785 &CLOG_CONFIG_DEFAULT_KEY
);
786 // We expect booleans, but they are in k/v pairs, kept
787 // as strings, in 'log_to_syslog'. We must ensure
788 // compatibility with existing boolean handling, and so
789 // we are here using a modified version of how
790 // md_config_t::set_val_raw() handles booleans. We will
791 // accept both 'true' and 'false', but will also check for
792 // '1' and '0'. The main distiction between this and the
793 // original code is that we will assume everything not '1',
794 // '0', 'true' or 'false' to be 'false'.
797 if (boost::iequals(v
, "false")) {
799 } else if (boost::iequals(v
, "true")) {
803 int b
= strict_strtol(v
.c_str(), 10, &err
);
804 ret
= (err
.empty() && b
== 1);
810 ceph::logging::Graylog::Ref
LogMonitor::log_channel_info::get_graylog(
811 const string
&channel
)
813 generic_dout(25) << __func__
<< " for channel '"
814 << channel
<< "'" << dendl
;
816 if (graylogs
.count(channel
) == 0) {
817 auto graylog(std::make_shared
<ceph::logging::Graylog
>("mon"));
819 graylog
->set_fsid(g_conf
->get_val
<uuid_d
>("fsid"));
820 graylog
->set_hostname(g_conf
->host
);
821 graylog
->set_destination(get_str_map_key(log_to_graylog_host
, channel
,
822 &CLOG_CONFIG_DEFAULT_KEY
),
823 atoi(get_str_map_key(log_to_graylog_port
, channel
,
824 &CLOG_CONFIG_DEFAULT_KEY
).c_str()));
826 graylogs
[channel
] = graylog
;
827 generic_dout(20) << __func__
<< " for channel '"
828 << channel
<< "' to graylog host '"
829 << log_to_graylog_host
[channel
] << ":"
830 << log_to_graylog_port
[channel
]
833 return graylogs
[channel
];
836 void LogMonitor::handle_conf_change(const struct md_config_t
*conf
,
837 const std::set
<std::string
> &changed
)
839 if (changed
.count("mon_cluster_log_to_syslog") ||
840 changed
.count("mon_cluster_log_to_syslog_level") ||
841 changed
.count("mon_cluster_log_to_syslog_facility") ||
842 changed
.count("mon_cluster_log_file") ||
843 changed
.count("mon_cluster_log_file_level") ||
844 changed
.count("mon_cluster_log_to_graylog") ||
845 changed
.count("mon_cluster_log_to_graylog_host") ||
846 changed
.count("mon_cluster_log_to_graylog_port")) {
847 update_log_channels();