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 memset(&e
.who
, 0, sizeof(e
.who
));
66 e
.name
= g_conf
->name
;
67 e
.stamp
= ceph_clock_now();
70 ss
<< "mkfs " << mon
->monmap
->get_fsid();
73 pending_log
.insert(pair
<utime_t
,LogEntry
>(e
.stamp
, e
));
76 void LogMonitor::update_from_paxos(bool *need_bootstrap
)
78 dout(10) << __func__
<< dendl
;
79 version_t version
= get_last_committed();
80 dout(10) << __func__
<< " version " << version
81 << " summary v " << summary
.version
<< dendl
;
82 if (version
== summary
.version
)
84 assert(version
>= summary
.version
);
86 map
<string
,bufferlist
> channel_blog
;
88 version_t latest_full
= get_version_latest_full();
89 dout(10) << __func__
<< " latest full " << latest_full
<< dendl
;
90 if ((latest_full
> 0) && (latest_full
> summary
.version
)) {
92 get_version_full(latest_full
, latest_bl
);
93 assert(latest_bl
.length() != 0);
94 dout(7) << __func__
<< " loading summary e" << latest_full
<< dendl
;
95 bufferlist::iterator p
= latest_bl
.begin();
97 dout(7) << __func__
<< " loaded summary e" << summary
.version
<< dendl
;
100 // walk through incrementals
101 while (version
> summary
.version
) {
103 int err
= get_version(summary
.version
+1, bl
);
107 bufferlist::iterator p
= bl
.begin();
113 dout(7) << "update_from_paxos applying incremental log " << summary
.version
+1 << " " << le
<< dendl
;
115 string channel
= le
.channel
;
116 if (channel
.empty()) // keep retrocompatibility
117 channel
= CLOG_CHANNEL_CLUSTER
;
119 if (g_conf
->get_val
<bool>("mon_cluster_log_to_stderr")) {
120 cerr
<< channel
<< " " << le
<< std::endl
;
123 if (channels
.do_log_to_syslog(channel
)) {
124 string level
= channels
.get_level(channel
);
125 string facility
= channels
.get_facility(channel
);
126 if (level
.empty() || facility
.empty()) {
127 derr
<< __func__
<< " unable to log to syslog -- level or facility"
128 << " not defined (level: " << level
<< ", facility: "
129 << facility
<< ")" << dendl
;
132 le
.log_to_syslog(channels
.get_level(channel
),
133 channels
.get_facility(channel
));
136 if (channels
.do_log_to_graylog(channel
)) {
137 ceph::logging::Graylog::Ref graylog
= channels
.get_graylog(channel
);
139 graylog
->log_log_entry(&le
);
141 dout(7) << "graylog: " << channel
<< " " << graylog
142 << " host:" << channels
.log_to_graylog_host
<< dendl
;
145 string log_file
= channels
.get_log_file(channel
);
146 dout(20) << __func__
<< " logging for channel '" << channel
147 << "' to file '" << log_file
<< "'" << dendl
;
149 if (!log_file
.empty()) {
150 string log_file_level
= channels
.get_log_file_level(channel
);
151 if (log_file_level
.empty()) {
152 dout(1) << __func__
<< " warning: log file level not defined for"
153 << " channel '" << channel
<< "' yet a log file is --"
154 << " will assume lowest level possible" << dendl
;
157 int min
= string_to_syslog_level(log_file_level
);
158 int l
= clog_type_to_syslog_level(le
.prio
);
163 bufferlist
&blog
= channel_blog
[channel
];
164 blog
.append(ss
.str());
172 summary
.prune(g_conf
->mon_log_max_summary
);
175 dout(15) << __func__
<< " logging for "
176 << channel_blog
.size() << " channels" << dendl
;
177 for(map
<string
,bufferlist
>::iterator p
= channel_blog
.begin();
178 p
!= channel_blog
.end(); ++p
) {
179 if (!p
->second
.length()) {
180 dout(15) << __func__
<< " channel '" << p
->first
181 << "': nothing to log" << dendl
;
185 dout(15) << __func__
<< " channel '" << p
->first
186 << "' logging " << p
->second
.length() << " bytes" << dendl
;
187 string log_file
= channels
.get_log_file(p
->first
);
189 int fd
= ::open(log_file
.c_str(), O_WRONLY
|O_APPEND
|O_CREAT
, 0600);
192 dout(1) << "unable to write to '" << log_file
<< "' for channel '"
193 << p
->first
<< "': " << cpp_strerror(err
) << dendl
;
195 int err
= p
->second
.write_fd(fd
);
197 dout(1) << "error writing to '" << log_file
<< "' for channel '"
198 << p
->first
<< ": " << cpp_strerror(err
) << dendl
;
200 VOID_TEMP_FAILURE_RETRY(::close(fd
));
207 void LogMonitor::create_pending()
210 pending_summary
= summary
;
211 dout(10) << "create_pending v " << (get_last_committed() + 1) << dendl
;
214 void LogMonitor::encode_pending(MonitorDBStore::TransactionRef t
)
216 version_t version
= get_last_committed() + 1;
218 dout(10) << __func__
<< " v" << version
<< dendl
;
221 multimap
<utime_t
,LogEntry
>::iterator p
;
222 for (p
= pending_log
.begin(); p
!= pending_log
.end(); ++p
)
223 p
->second
.encode(bl
, mon
->get_quorum_con_features());
225 put_version(t
, version
, bl
);
226 put_last_committed(t
, version
);
229 void LogMonitor::encode_full(MonitorDBStore::TransactionRef t
)
231 dout(10) << __func__
<< " log v " << summary
.version
<< dendl
;
232 assert(get_last_committed() == summary
.version
);
234 bufferlist summary_bl
;
235 ::encode(summary
, summary_bl
, mon
->get_quorum_con_features());
237 put_version_full(t
, summary
.version
, summary_bl
);
238 put_version_latest_full(t
, summary
.version
);
241 version_t
LogMonitor::get_trim_to()
243 if (!mon
->is_leader())
246 unsigned max
= g_conf
->mon_max_log_epochs
;
247 version_t version
= get_last_committed();
249 return version
- max
;
253 bool LogMonitor::preprocess_query(MonOpRequestRef op
)
255 op
->mark_logmon_event("preprocess_query");
256 PaxosServiceMessage
*m
= static_cast<PaxosServiceMessage
*>(op
->get_req());
257 dout(10) << "preprocess_query " << *m
<< " from " << m
->get_orig_source_inst() << dendl
;
258 switch (m
->get_type()) {
259 case MSG_MON_COMMAND
:
260 return preprocess_command(op
);
263 return preprocess_log(op
);
271 bool LogMonitor::prepare_update(MonOpRequestRef op
)
273 op
->mark_logmon_event("prepare_update");
274 PaxosServiceMessage
*m
= static_cast<PaxosServiceMessage
*>(op
->get_req());
275 dout(10) << "prepare_update " << *m
<< " from " << m
->get_orig_source_inst() << dendl
;
276 switch (m
->get_type()) {
277 case MSG_MON_COMMAND
:
278 return prepare_command(op
);
280 return prepare_log(op
);
287 bool LogMonitor::preprocess_log(MonOpRequestRef op
)
289 op
->mark_logmon_event("preprocess_log");
290 MLog
*m
= static_cast<MLog
*>(op
->get_req());
291 dout(10) << "preprocess_log " << *m
<< " from " << m
->get_orig_source() << dendl
;
294 MonSession
*session
= m
->get_session();
297 if (!session
->is_capable("log", MON_CAP_W
)) {
298 dout(0) << "preprocess_log got MLog from entity with insufficient privileges "
299 << session
->caps
<< dendl
;
303 for (deque
<LogEntry
>::iterator p
= m
->entries
.begin();
304 p
!= m
->entries
.end();
306 if (!pending_summary
.contains(p
->key()))
310 dout(10) << " nothing new" << dendl
;
321 struct LogMonitor::C_Log
: public C_MonOp
{
323 C_Log(LogMonitor
*p
, MonOpRequestRef o
) :
324 C_MonOp(o
), logmon(p
) {}
325 void _finish(int r
) override
{
326 if (r
== -ECANCELED
) {
329 logmon
->_updated_log(op
);
333 bool LogMonitor::prepare_log(MonOpRequestRef op
)
335 op
->mark_logmon_event("prepare_log");
336 MLog
*m
= static_cast<MLog
*>(op
->get_req());
337 dout(10) << "prepare_log " << *m
<< " from " << m
->get_orig_source() << dendl
;
339 if (m
->fsid
!= mon
->monmap
->fsid
) {
340 dout(0) << "handle_log on fsid " << m
->fsid
<< " != " << mon
->monmap
->fsid
345 for (deque
<LogEntry
>::iterator p
= m
->entries
.begin();
346 p
!= m
->entries
.end();
348 dout(10) << " logging " << *p
<< dendl
;
349 if (!pending_summary
.contains(p
->key())) {
350 pending_summary
.add(*p
);
351 pending_log
.insert(pair
<utime_t
,LogEntry
>(p
->stamp
, *p
));
354 pending_summary
.prune(g_conf
->mon_log_max_summary
);
355 wait_for_finished_proposal(op
, new C_Log(this, op
));
359 void LogMonitor::_updated_log(MonOpRequestRef op
)
361 MLog
*m
= static_cast<MLog
*>(op
->get_req());
362 dout(7) << "_updated_log for " << m
->get_orig_source_inst() << dendl
;
363 mon
->send_reply(op
, new MLogAck(m
->fsid
, m
->entries
.rbegin()->seq
));
366 bool LogMonitor::should_propose(double& delay
)
368 // commit now if we have a lot of pending events
369 if (g_conf
->mon_max_log_entries_per_event
> 0 &&
370 pending_log
.size() >= (unsigned)g_conf
->mon_max_log_entries_per_event
)
373 // otherwise fall back to generic policy
374 return PaxosService::should_propose(delay
);
378 bool LogMonitor::preprocess_command(MonOpRequestRef op
)
380 op
->mark_logmon_event("preprocess_command");
381 MMonCommand
*m
= static_cast<MMonCommand
*>(op
->get_req());
386 map
<string
, cmd_vartype
> cmdmap
;
387 if (!cmdmap_from_json(m
->cmd
, &cmdmap
, ss
)) {
388 string rs
= ss
.str();
389 mon
->reply_command(op
, -EINVAL
, rs
, get_last_committed());
392 MonSession
*session
= m
->get_session();
394 mon
->reply_command(op
, -EACCES
, "access denied", get_last_committed());
399 cmd_getval(g_ceph_context
, cmdmap
, "prefix", prefix
);
402 cmd_getval(g_ceph_context
, cmdmap
, "format", format
, string("plain"));
403 boost::scoped_ptr
<Formatter
> f(Formatter::create(format
));
405 if (prefix
== "log last") {
407 cmd_getval(g_ceph_context
, cmdmap
, "num", num
);
409 f
->open_array_section("tail");
412 std::string level_str
;
414 if (cmd_getval(g_ceph_context
, cmdmap
, "level", level_str
)) {
415 level
= LogEntry::str_to_level(level_str
);
416 if (level
== CLOG_UNKNOWN
) {
417 ss
<< "Invalid severity '" << level_str
<< "'";
418 mon
->reply_command(op
, -EINVAL
, ss
.str(), get_last_committed());
426 if (!cmd_getval(g_ceph_context
, cmdmap
, "channel", channel
)) {
427 channel
= CLOG_CHANNEL_DEFAULT
;
430 // We'll apply this twice, once while counting out lines
431 // and once while outputting them.
432 auto match
= [level
, channel
](const LogEntry
&entry
) {
433 return entry
.prio
>= level
&& (entry
.channel
== channel
|| channel
== "*");
436 auto rp
= summary
.tail
.rbegin();
437 for (; num
> 0 && rp
!= summary
.tail
.rend(); ++rp
) {
442 if (rp
== summary
.tail
.rend()) {
446 for (; rp
!= summary
.tail
.rbegin(); --rp
) {
452 f
->dump_object("entry", *rp
);
461 rdata
.append(ss
.str());
470 mon
->reply_command(op
, r
, rs
, rdata
, get_last_committed());
475 bool LogMonitor::prepare_command(MonOpRequestRef op
)
477 op
->mark_logmon_event("prepare_command");
478 MMonCommand
*m
= static_cast<MMonCommand
*>(op
->get_req());
483 map
<string
, cmd_vartype
> cmdmap
;
484 if (!cmdmap_from_json(m
->cmd
, &cmdmap
, ss
)) {
485 // ss has reason for failure
486 string rs
= ss
.str();
487 mon
->reply_command(op
, -EINVAL
, rs
, get_last_committed());
492 cmd_getval(g_ceph_context
, cmdmap
, "prefix", prefix
);
494 MonSession
*session
= m
->get_session();
496 mon
->reply_command(op
, -EACCES
, "access denied", get_last_committed());
500 if (prefix
== "log") {
501 vector
<string
> logtext
;
502 cmd_getval(g_ceph_context
, cmdmap
, "logtext", logtext
);
504 le
.who
= m
->get_orig_source_inst();
505 le
.name
= session
->entity_name
;
506 le
.stamp
= m
->get_recv_stamp();
509 le
.channel
= CLOG_CHANNEL_DEFAULT
;
510 le
.msg
= str_join(logtext
, " ");
511 pending_summary
.add(le
);
512 pending_summary
.prune(g_conf
->mon_log_max_summary
);
513 pending_log
.insert(pair
<utime_t
,LogEntry
>(le
.stamp
, le
));
514 wait_for_finished_proposal(op
, new Monitor::C_Command(
515 mon
, op
, 0, string(), get_last_committed() + 1));
520 mon
->reply_command(op
, err
, rs
, get_last_committed());
525 int LogMonitor::sub_name_to_id(const string
& n
)
527 if (n
.substr(0, 4) == "log-" && n
.size() > 4) {
528 return LogEntry::str_to_level(n
.substr(4));
534 void LogMonitor::check_subs()
536 dout(10) << __func__
<< dendl
;
537 for (map
<string
, xlist
<Subscription
*>*>::iterator i
= mon
->session_map
.subs
.begin();
538 i
!= mon
->session_map
.subs
.end();
540 for (xlist
<Subscription
*>::iterator j
= i
->second
->begin(); !j
.end(); ++j
) {
541 if (sub_name_to_id((*j
)->type
) >= 0)
547 void LogMonitor::check_sub(Subscription
*s
)
549 dout(10) << __func__
<< " client wants " << s
->type
<< " ver " << s
->next
<< dendl
;
551 int sub_level
= sub_name_to_id(s
->type
);
552 assert(sub_level
>= 0);
554 version_t summary_version
= summary
.version
;
555 if (s
->next
> summary_version
) {
556 dout(10) << __func__
<< " client " << s
->session
->inst
557 << " requested version (" << s
->next
<< ") is greater than ours ("
558 << summary_version
<< "), which means we already sent him"
559 << " everything we have." << dendl
;
563 MLog
*mlog
= new MLog(mon
->monmap
->fsid
);
566 /* First timer, heh? */
567 bool ret
= _create_sub_summary(mlog
, sub_level
);
569 dout(1) << __func__
<< " ret = " << ret
<< dendl
;
574 /* let us send you an incremental log... */
575 _create_sub_incremental(mlog
, sub_level
, s
->next
);
578 dout(1) << __func__
<< " sending message to " << s
->session
->inst
579 << " with " << mlog
->entries
.size() << " entries"
580 << " (version " << mlog
->version
<< ")" << dendl
;
582 if (!mlog
->entries
.empty()) {
583 s
->session
->con
->send_message(mlog
);
588 mon
->session_map
.remove_sub(s
);
590 s
->next
= summary_version
+1;
594 * Create a log message containing only the last message in the summary.
596 * @param mlog Log message we'll send to the client.
597 * @param level Maximum log level the client is interested in.
598 * @return 'true' if we consider we successfully populated @mlog;
601 bool LogMonitor::_create_sub_summary(MLog
*mlog
, int level
)
603 dout(10) << __func__
<< dendl
;
605 assert(mlog
!= NULL
);
607 if (!summary
.tail
.size())
610 list
<LogEntry
>::reverse_iterator it
= summary
.tail
.rbegin();
611 for (; it
!= summary
.tail
.rend(); ++it
) {
616 mlog
->entries
.push_back(e
);
617 mlog
->version
= summary
.version
;
625 * Create an incremental log message from version \p sv to \p summary.version
627 * @param mlog Log message we'll send to the client with the messages received
628 * since version \p sv, inclusive.
629 * @param level The max log level of the messages the client is interested in.
630 * @param sv The version the client is looking for.
632 void LogMonitor::_create_sub_incremental(MLog
*mlog
, int level
, version_t sv
)
634 dout(10) << __func__
<< " level " << level
<< " ver " << sv
635 << " cur summary ver " << summary
.version
<< dendl
;
637 if (sv
< get_first_committed()) {
638 dout(10) << __func__
<< " skipped from " << sv
639 << " to first_committed " << get_first_committed() << dendl
;
641 le
.stamp
= ceph_clock_now();
644 ss
<< "skipped log messages from " << sv
<< " to " << get_first_committed();
646 mlog
->entries
.push_back(le
);
647 sv
= get_first_committed();
650 version_t summary_ver
= summary
.version
;
651 while (sv
&& sv
<= summary_ver
) {
653 int err
= get_version(sv
, bl
);
656 bufferlist::iterator p
= bl
.begin();
663 if (le
.prio
< level
) {
664 dout(20) << __func__
<< " requested " << level
665 << " entry " << le
.prio
<< dendl
;
669 mlog
->entries
.push_back(le
);
671 mlog
->version
= sv
++;
674 dout(10) << __func__
<< " incremental message ready ("
675 << mlog
->entries
.size() << " entries)" << dendl
;
678 void LogMonitor::update_log_channels()
684 int r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_syslog
,
685 oss
, &channels
.log_to_syslog
,
686 CLOG_CONFIG_DEFAULT_KEY
);
688 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_syslog'" << dendl
;
692 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_syslog_level
,
693 oss
, &channels
.syslog_level
,
694 CLOG_CONFIG_DEFAULT_KEY
);
696 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_syslog_level'"
701 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_syslog_facility
,
702 oss
, &channels
.syslog_facility
,
703 CLOG_CONFIG_DEFAULT_KEY
);
705 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_syslog_facility'"
710 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_file
, oss
,
712 CLOG_CONFIG_DEFAULT_KEY
);
714 derr
<< __func__
<< " error parsing 'mon_cluster_log_file'" << dendl
;
718 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_file_level
, oss
,
719 &channels
.log_file_level
,
720 CLOG_CONFIG_DEFAULT_KEY
);
722 derr
<< __func__
<< " error parsing 'mon_cluster_log_file_level'"
727 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_graylog
, oss
,
728 &channels
.log_to_graylog
,
729 CLOG_CONFIG_DEFAULT_KEY
);
731 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_graylog'"
736 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_graylog_host
, oss
,
737 &channels
.log_to_graylog_host
,
738 CLOG_CONFIG_DEFAULT_KEY
);
740 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_graylog_host'"
745 r
= get_conf_str_map_helper(g_conf
->mon_cluster_log_to_graylog_port
, oss
,
746 &channels
.log_to_graylog_port
,
747 CLOG_CONFIG_DEFAULT_KEY
);
749 derr
<< __func__
<< " error parsing 'mon_cluster_log_to_graylog_port'"
754 channels
.expand_channel_meta();
757 void LogMonitor::log_channel_info::expand_channel_meta(map
<string
,string
> &m
)
759 generic_dout(20) << __func__
<< " expand map: " << m
<< dendl
;
760 for (map
<string
,string
>::iterator p
= m
.begin(); p
!= m
.end(); ++p
) {
761 m
[p
->first
] = expand_channel_meta(p
->second
, p
->first
);
763 generic_dout(20) << __func__
<< " expanded map: " << m
<< dendl
;
766 string
LogMonitor::log_channel_info::expand_channel_meta(
768 const string
&change_to
)
770 size_t pos
= string::npos
;
772 while ((pos
= s
.find(LOG_META_CHANNEL
)) != string::npos
) {
773 string tmp
= s
.substr(0, pos
) + change_to
;
774 if (pos
+LOG_META_CHANNEL
.length() < s
.length())
775 tmp
+= s
.substr(pos
+LOG_META_CHANNEL
.length());
778 generic_dout(20) << __func__
<< " from '" << input
779 << "' to '" << s
<< "'" << dendl
;
784 bool LogMonitor::log_channel_info::do_log_to_syslog(const string
&channel
) {
785 string v
= get_str_map_key(log_to_syslog
, channel
,
786 &CLOG_CONFIG_DEFAULT_KEY
);
787 // We expect booleans, but they are in k/v pairs, kept
788 // as strings, in 'log_to_syslog'. We must ensure
789 // compatibility with existing boolean handling, and so
790 // we are here using a modified version of how
791 // md_config_t::set_val_raw() handles booleans. We will
792 // accept both 'true' and 'false', but will also check for
793 // '1' and '0'. The main distiction between this and the
794 // original code is that we will assume everything not '1',
795 // '0', 'true' or 'false' to be 'false'.
798 if (boost::iequals(v
, "false")) {
800 } else if (boost::iequals(v
, "true")) {
804 int b
= strict_strtol(v
.c_str(), 10, &err
);
805 ret
= (err
.empty() && b
== 1);
811 ceph::logging::Graylog::Ref
LogMonitor::log_channel_info::get_graylog(
812 const string
&channel
)
814 generic_dout(25) << __func__
<< " for channel '"
815 << channel
<< "'" << dendl
;
817 if (graylogs
.count(channel
) == 0) {
818 auto graylog(std::make_shared
<ceph::logging::Graylog
>("mon"));
820 graylog
->set_fsid(g_conf
->get_val
<uuid_d
>("fsid"));
821 graylog
->set_hostname(g_conf
->host
);
822 graylog
->set_destination(get_str_map_key(log_to_graylog_host
, channel
,
823 &CLOG_CONFIG_DEFAULT_KEY
),
824 atoi(get_str_map_key(log_to_graylog_port
, channel
,
825 &CLOG_CONFIG_DEFAULT_KEY
).c_str()));
827 graylogs
[channel
] = graylog
;
828 generic_dout(20) << __func__
<< " for channel '"
829 << channel
<< "' to graylog host '"
830 << log_to_graylog_host
[channel
] << ":"
831 << log_to_graylog_port
[channel
]
834 return graylogs
[channel
];
837 void LogMonitor::handle_conf_change(const struct md_config_t
*conf
,
838 const std::set
<std::string
> &changed
)
840 if (changed
.count("mon_cluster_log_to_syslog") ||
841 changed
.count("mon_cluster_log_to_syslog_level") ||
842 changed
.count("mon_cluster_log_to_syslog_facility") ||
843 changed
.count("mon_cluster_log_file") ||
844 changed
.count("mon_cluster_log_file_level") ||
845 changed
.count("mon_cluster_log_to_graylog") ||
846 changed
.count("mon_cluster_log_to_graylog_host") ||
847 changed
.count("mon_cluster_log_to_graylog_port")) {
848 update_log_channels();