diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index 0f8b2d699..4942f2f8a 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -484,12 +484,12 @@ disable use the value 0. #### `log_to_shm` -**Note:** This parameter is deprecated and it is ignored by MaxScale versions - 2.3.0 and newer. If you want to store the log in shared memory, define the - directory with `logdir` in `/dev/shm`. +**Note:** This parameter has been removed in 2.4.0: do not use it -In older MaxScale versions, the actual log file was created in `/dev/shm` and a -symbolic link to that file was stored in place of the normal MaxScale log. +In older MaxScale versions, the actual log file was created in `/dev/shm` and +a symbolic link to that file was stored in place of the normal MaxScale log. +If you want to store the log in shared memory, define the directory with +`logdir` in `/dev/shm`. #### `log_warning` diff --git a/Documentation/REST-API/Resources-MaxScale.md b/Documentation/REST-API/Resources-MaxScale.md index c6e067632..995a28485 100644 --- a/Documentation/REST-API/Resources-MaxScale.md +++ b/Documentation/REST-API/Resources-MaxScale.md @@ -312,8 +312,7 @@ location where the log files are stored. "log_warning": true, "log_notice": true, "log_info": true, - "log_debug": false, - "log_to_shm": false + "log_debug": false }, "log_file": "/home/markusjm/build/log/maxscale/maxscale.log", "log_priorities": [ @@ -336,8 +335,7 @@ PATCH /v1/maxscale/logs ``` Update logging parameters. The request body must define updated values for the -`data.attributes.parameters` object. All logging parameters apart from -`log_to_shm` can be altered at runtime. +`data.attributes.parameters` object. All logging parameters can be altered at runtime. #### Response diff --git a/include/maxscale/config.hh b/include/maxscale/config.hh index f46f80edf..7faedbd1f 100644 --- a/include/maxscale/config.hh +++ b/include/maxscale/config.hh @@ -224,7 +224,6 @@ extern const char CN_MODULE_CONFIGDIR[]; extern const char CN_SYSLOG[]; extern const char CN_MAXLOG[]; extern const char CN_LOG_AUGMENTATION[]; -extern const char CN_LOG_TO_SHM[]; namespace maxscale { diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.bug567 b/maxscale-system-test/cnf/maxscale.cnf.template.bug567 index 07ddbc441..9c4426173 100755 --- a/maxscale-system-test/cnf/maxscale.cnf.template.bug567 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.bug567 @@ -1,7 +1,6 @@ [maxscale] threads=###threads### log_warning=1 -log_to_shm=1 log_debug=1 [MySQL-Monitor] diff --git a/server/core/config.cc b/server/core/config.cc index fc1670c98..bc0bd5bd6 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -216,7 +216,6 @@ extern const char CN_MODULE_CONFIGDIR[] = "module_configdir"; extern const char CN_SYSLOG[] = "syslog"; extern const char CN_MAXLOG[] = "maxlog"; extern const char CN_LOG_AUGMENTATION[] = "log_augmentation"; -extern const char CN_LOG_TO_SHM[] = "log_to_shm"; typedef struct duplicate_context { @@ -738,7 +737,6 @@ const char* config_pre_parse_global_params[] = CN_SYSLOG, CN_MAXLOG, CN_LOG_AUGMENTATION, - CN_LOG_TO_SHM, CN_SUBSTITUTE_VARIABLES, NULL }; diff --git a/server/core/gateway.cc b/server/core/gateway.cc index 6f54a23ca..9eed4ae2d 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -148,7 +148,6 @@ static struct option long_options[] = static bool syslog_configured = false; static bool maxlog_configured = false; -static bool log_to_shm_configured = false; static volatile sig_atomic_t last_signal = 0; static bool unload_modules_at_exit = true; static std::string redirect_output_to; @@ -1531,12 +1530,6 @@ int main(int argc, char** argv) { cnf->log_target = MXB_LOG_TARGET_FS; } - else if (strncasecmp(optarg, "shm", PATH_MAX) == 0) - { - // Removed in 2.3 - cnf->log_target = MXB_LOG_TARGET_FS; - fprintf(stderr, "Warning: Use of `--log=shm` is deprecated. Data will be logged to file.\n"); - } else if (strncasecmp(optarg, "stdout", PATH_MAX) == 0) { cnf->log_target = MXB_LOG_TARGET_STDOUT; @@ -2847,13 +2840,6 @@ static int cnf_preparser(void* data, const char* section, const char* name, cons { set_log_augmentation(value); } - else if (strcmp(name, CN_LOG_TO_SHM) == 0) - { - fprintf(stderr, - "Warning: '%s' has been removed in MaxScale 2.3.0 " - "and will be ignored\n", - CN_LOG_TO_SHM); - } else if (strcmp(name, CN_SUBSTITUTE_VARIABLES) == 0) { cnf->substitute_variables = config_truth_value(value); diff --git a/server/core/log.cc b/server/core/log.cc index 246933b75..1894b2303 100644 --- a/server/core/log.cc +++ b/server/core/log.cc @@ -122,7 +122,6 @@ json_t* mxs_logs_to_json(const char* host) json_object_set_new(param, "log_notice", json_boolean(mxb_log_is_priority_enabled(LOG_NOTICE))); json_object_set_new(param, "log_info", json_boolean(mxb_log_is_priority_enabled(LOG_INFO))); json_object_set_new(param, "log_debug", json_boolean(mxb_log_is_priority_enabled(LOG_DEBUG))); - json_object_set_new(param, "log_to_shm", json_boolean(false)); json_t* attr = json_object(); json_object_set_new(attr, CN_PARAMETERS, param); @@ -150,4 +149,4 @@ bool mxs_log_rotate() int mxs_get_log_rotation_count() { return this_unit.rotation_count.load(std::memory_order_relaxed); -} \ No newline at end of file +}