MXS-1220: Add logging priorities to logs resoure

The logging priorities can now be queried and altered.
This commit is contained in:
Markus Mäkelä
2017-05-17 09:37:57 +03:00
parent 05cb49d48a
commit f1c790db52
3 changed files with 100 additions and 60 deletions

View File

@ -3029,6 +3029,10 @@ json_t* mxs_logs_to_json(const char* host)
json_object_set_new(throttling, "suppress_ms", json_integer(log_config.throttling.suppress_ms));
json_object_set_new(throttling, "window_ms", json_integer(log_config.throttling.window_ms));
json_object_set_new(param, "throttling", throttling);
json_object_set_new(param, "log_warning", json_boolean(mxs_log_priority_is_enabled(LOG_WARNING)));
json_object_set_new(param, "log_notice", json_boolean(mxs_log_priority_is_enabled(LOG_NOTICE)));
json_object_set_new(param, "log_info", json_boolean(mxs_log_priority_is_enabled(LOG_INFO)));
json_object_set_new(param, "log_debug", json_boolean(mxs_log_priority_is_enabled(LOG_DEBUG)));
json_t* attr = json_object();
json_object_set_new(attr, CN_PARAMETERS, param);