From cc0fa1b395dff8dfe1c53be2fb33c42231bd9df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Ple=C5=A1ko?= Date: Tue, 12 Dec 2017 13:58:31 +0100 Subject: [PATCH] Introduce $vmware_cloud_log that logs into log/vmware_cloud.log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this commit we introduce yet another global logger that is to be used by VMware provider. We're having quite some logs there and it's better to log them into its own file. Signed-off-by: Miha Pleško --- .rubocop_local.yml | 1 + config/settings.yml | 1 + lib/vmdb/loggers.rb | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.rubocop_local.yml b/.rubocop_local.yml index 8e8bd216807b..b3b951802365 100644 --- a/.rubocop_local.yml +++ b/.rubocop_local.yml @@ -20,6 +20,7 @@ GlobalVars: - $scvmm_log - $vim_log - $websocket_log + - $vmware_cloud_log # In Automate methods - $evm # diff --git a/config/settings.yml b/config/settings.yml index e6959b4967c4..ce53cc4b023d 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -882,6 +882,7 @@ :level_scvmm: info :level_vim: warn :level_websocket: info + :level_vmware_cloud: info :ntp: :server: - 0.pool.ntp.org diff --git a/lib/vmdb/loggers.rb b/lib/vmdb/loggers.rb index f694c5ee29c0..efe160d1d4fe 100644 --- a/lib/vmdb/loggers.rb +++ b/lib/vmdb/loggers.rb @@ -33,6 +33,7 @@ def self.apply_config(config) apply_config_value(config, $azure_log, :level_azure) apply_config_value(config, $lenovo_log, :level_lenovo) apply_config_value(config, $websocket_log, :level_websocket) + apply_config_value(config, $vmware_cloud_log, :level_vmware_cloud) end def self.create_loggers @@ -57,6 +58,7 @@ def self.create_loggers $api_log = create_multicast_logger(path_dir.join("api.log")) $websocket_log = create_multicast_logger(path_dir.join("websocket.log")) $miq_ae_logger = create_multicast_logger(path_dir.join("automation.log")) + $vmware_cloud_log = create_multicast_logger(path_dir.join("vmware_cloud.log")) configure_external_loggers end