From 978ac6e2f8e9fe4cc20410c6b45b1a164e22c4ea Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 3 Apr 2019 07:18:50 -0500 Subject: [PATCH] mon/LogMonitor: add mon_cluster_log_to_file bool option Allow cluster logging to a file to be disabled via a boolean. Default to true to avoid any change in behavior. Signed-off-by: Sage Weil --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 9 +++++++- src/mon/LogMonitor.cc | 40 +++++++++++++++++---------------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index c10a906e65957..f17b2f412c69a 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -68,6 +68,7 @@ OPTION(clog_to_graylog_port, OPT_STR) OPTION(mon_cluster_log_to_syslog, OPT_STR) OPTION(mon_cluster_log_to_syslog_level, OPT_STR) // this level and above OPTION(mon_cluster_log_to_syslog_facility, OPT_STR) +OPTION(mon_cluster_log_to_file, OPT_BOOL) OPTION(mon_cluster_log_file, OPT_STR) OPTION(mon_cluster_log_file_level, OPT_STR) OPTION(mon_cluster_log_to_graylog, OPT_STR) diff --git a/src/common/options.cc b/src/common/options.cc index 8a35540db451f..5181cf6c48d5f 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -663,11 +663,18 @@ std::vector