Skip to content

Commit

Permalink
Merge pull request #17130 from NickLaMuro/fix_default_debug_for_autom…
Browse files Browse the repository at this point in the history
…ation_logger

Fix Default log level for automation log
(cherry picked from commit ca25c15)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553924
  • Loading branch information
bdunne authored and simaishi committed Mar 9, 2018
1 parent 23f0004 commit 404be15
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
12 changes: 7 additions & 5 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -901,16 +901,18 @@
:ping_depot_timeout: 20
:level: info
:level_rails: info
:level_lenovo: info
:level_mw: info
:level_cn_monitoring: info
:level_api: info
:level_automation: info
:level_cn_monitoring: info
:level_fog: info
:level_lenovo: info
:level_mw: info
:level_nuage: info
:level_policy: info
:level_scvmm: info
:level_vcloud: info
:level_vim: warn
:level_websocket: info
:level_vcloud: info
:level_nuage: info
:notifications:
:history:
:purge_window_size: 1000
Expand Down
46 changes: 24 additions & 22 deletions lib/vmdb/loggers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,23 @@ def self.init
def self.apply_config(config)
apply_config_value(config, $log, :level)
apply_config_value(config, $rails_log, :level_rails)
apply_config_value(config, $vim_log, :level_vim)
apply_config_value(config, $rhevm_log, :level_rhevm)
apply_config_value(config, $api_log, :level_api)
apply_config_value(config, $miq_ae_logger, :level_automation)
apply_config_value(config, $aws_log, :level_aws)
apply_config_value(config, $kube_log, :level_kube)
apply_config_value(config, $mw_log, :level_mw)
apply_config_value(config, $datawarehouse_log, :level_datawarehouse)
apply_config_value(config, $azure_log, :level_azure)
apply_config_value(config, $cn_monitoring_log, :level_cn_monitoring)
apply_config_value(config, $scvmm_log, :level_scvmm)
apply_config_value(config, $api_log, :level_api)
apply_config_value(config, $datawarehouse_log, :level_datawarehouse)
apply_config_value(config, $fog_log, :level_fog)
apply_config_value(config, $azure_log, :level_azure)
apply_config_value(config, $kube_log, :level_kube)
apply_config_value(config, $lenovo_log, :level_lenovo)
apply_config_value(config, $websocket_log, :level_websocket)
apply_config_value(config, $vcloud_log, :level_vcloud)
apply_config_value(config, $mw_log, :level_mw)
apply_config_value(config, $nuage_log, :level_nuage)
apply_config_value(config, $policy_log, :level_policy)
apply_config_value(config, $rhevm_log, :level_rhevm)
apply_config_value(config, $scvmm_log, :level_scvmm)
apply_config_value(config, $vcloud_log, :level_vcloud)
apply_config_value(config, $vim_log, :level_vim)
apply_config_value(config, $websocket_log, :level_websocket)
end

def self.create_loggers
Expand All @@ -109,23 +111,23 @@ def self.create_loggers
$container_log = ContainerLogger.new
$log = create_multicast_logger(path_dir.join("evm.log"))
$rails_log = create_multicast_logger(path_dir.join("#{Rails.env}.log"))
$fog_log = create_multicast_logger(path_dir.join("fog.log"), FogLogger)
$policy_log = create_multicast_logger(path_dir.join("policy.log"))
$vim_log = create_multicast_logger(path_dir.join("vim.log"))
$rhevm_log = create_multicast_logger(path_dir.join("rhevm.log"))
$api_log = create_multicast_logger(path_dir.join("api.log"))
$miq_ae_logger = create_multicast_logger(path_dir.join("automation.log"))
$aws_log = create_multicast_logger(path_dir.join("aws.log"))
$lenovo_log = create_multicast_logger(path_dir.join("lenovo.log"))
$azure_log = create_multicast_logger(path_dir.join("azure.log"))
$cn_monitoring_log = create_multicast_logger(path_dir.join("container_monitoring.log"))
$datawarehouse_log = create_multicast_logger(path_dir.join("datawarehouse.log"))
$fog_log = create_multicast_logger(path_dir.join("fog.log"), FogLogger)
$kube_log = create_multicast_logger(path_dir.join("kubernetes.log"))
$lenovo_log = create_multicast_logger(path_dir.join("lenovo.log"))
$mw_log = create_multicast_logger(path_dir.join("middleware.log"))
$datawarehouse_log = create_multicast_logger(path_dir.join("datawarehouse.log"))
$cn_monitoring_log = create_multicast_logger(path_dir.join("container_monitoring.log"))
$nuage_log = create_multicast_logger(path_dir.join("nuage.log"))
$policy_log = create_multicast_logger(path_dir.join("policy.log"))
$rhevm_log = create_multicast_logger(path_dir.join("rhevm.log"))
$scvmm_log = create_multicast_logger(path_dir.join("scvmm.log"))
$azure_log = create_multicast_logger(path_dir.join("azure.log"))
$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"))
$nuage_log = create_multicast_logger(path_dir.join("nuage.log"))
$vim_log = create_multicast_logger(path_dir.join("vim.log"))
$websocket_log = create_multicast_logger(path_dir.join("websocket.log"))

configure_external_loggers
end
Expand Down

0 comments on commit 404be15

Please sign in to comment.