From cb112a802ee31efdf12a6cdabfae1c197fd49332 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 $vcloud_log that logs into log/vcloud.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 8e8bd216807..3784dc7ce29 100644 --- a/.rubocop_local.yml +++ b/.rubocop_local.yml @@ -20,6 +20,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 e6959b4967c..89ff1665d8b 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -882,6 +882,7 @@ :level_scvmm: info :level_vim: warn :level_websocket: info + :level_vcloud: info :ntp: :server: - 0.pool.ntp.org diff --git a/lib/vmdb/loggers.rb b/lib/vmdb/loggers.rb index f694c5ee29c..0658c52e644 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, $vcloud_log, :level_vcloud) 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")) + $vcloud_log = create_multicast_logger(path_dir.join("vcloud.log")) configure_external_loggers end