From 7bb5d96ea7255268bf5bb1665237ea3683f41d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Ple=C5=A1ko?= Date: Fri, 5 Jan 2018 08:10:13 +0100 Subject: [PATCH] Introduce $vcloud_log (backporting to fine branch) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a [PR](https://github.com/ManageIQ/manageiq/pull/16641) already merged in master that introduces $vcloud_log, but since logging has changed in this [PR](https://github.com/ManageIQ/manageiq/pull/15397), there are merge conflicts for fine branch. Hence this commit. Signed-off-by: Miha Pleško --- .rubocop_local.yml | 1 + config/settings.yml | 2 ++ lib/vmdb/loggers.rb | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.rubocop_local.yml b/.rubocop_local.yml index c1df8b2c8400..c5d2d08bc4de 100644 --- a/.rubocop_local.yml +++ b/.rubocop_local.yml @@ -18,6 +18,7 @@ GlobalVars: - $scvmm_log - $vim_log - $websocket_log + - $vcloud_log # In Automate methods - $evm # diff --git a/config/settings.yml b/config/settings.yml index 3c61ad9a0a02..8fb65a199ae9 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1024,6 +1024,8 @@ :level_vim_in_evm: error :level_websocket: info :level_websocket_in_evm: error + :level_vcloud: info + :level_vcloud_in_evm: error :management_system: :power_operation_expiration: 10.minutes :performance: diff --git a/lib/vmdb/loggers.rb b/lib/vmdb/loggers.rb index 1aca852fe4e2..45a582124f1f 100644 --- a/lib/vmdb/loggers.rb +++ b/lib/vmdb/loggers.rb @@ -37,6 +37,7 @@ def self.apply_config(config) apply_config_value(config, $azure_log, :level_azure, :level_azure_in_evm) apply_config_value(config, $lenovo_log, :level_lenovo, :level_lenovo_in_evm) apply_config_value(config, $websocket_log, :level_websocket, :level_websocket_in_evm) + apply_config_value(config, $vcloud_log, :level_vcloud, :level_vcloud_in_evm) end private @@ -69,6 +70,7 @@ def self.create_loggers $websocket_log = MirroredLogger.new(path_dir.join("websocket.log"), " ") $miq_ae_logger = MirroredLogger.new(path_dir.join("automation.log"), " ") $miq_ae_logger.mirror_level = VMDBLogger::INFO + $vcloud_log = MirroredLogger.new(path_dir.join("vcloud.log"), " ") end configure_external_loggers