Skip to content

Commit

Permalink
Introduce $vmware_cloud_log that logs into log/vmware_cloud.log
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
miha-plesko committed Dec 12, 2017
1 parent ef211a1 commit cc0fa1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .rubocop_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ GlobalVars:
- $scvmm_log
- $vim_log
- $websocket_log
- $vmware_cloud_log
# In Automate methods
- $evm
#
Expand Down
1 change: 1 addition & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@
:level_scvmm: info
:level_vim: warn
:level_websocket: info
:level_vmware_cloud: info
:ntp:
:server:
- 0.pool.ntp.org
Expand Down
2 changes: 2 additions & 0 deletions lib/vmdb/loggers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cc0fa1b

Please sign in to comment.