Skip to content

Commit

Permalink
Merge pull request #930 from agrare/debug_vim_log_handsoap_body
Browse files Browse the repository at this point in the history
Add an option to log XML body for VIM requests
  • Loading branch information
Fryguy authored Dec 10, 2024
2 parents 0cec6f2 + d1af97e commit 452afa5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def vim_connect
:path => '/sdk',
:port => port,
:rev => '6.5',
:debug => Settings.ems.ems_vmware.debug_vim_requests
}

require 'rbvmomi'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class ManageIQ::Providers::Vmware::InfraManager::MetricsCollectorWorker::Runner
def do_before_work_loop
require "VMwareWebService/MiqVim"
MiqVim.cacheScope = :cache_scope_core
MiqVim.on_log_body { |body| $vim_log.debug(body) } if Settings.ems.ems_vmware.debug_vim_requests
end

def before_exit(_message, _exit_code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def do_before_work_loop
MiqVim.cacheScope = :cache_scope_core
MiqVim.monitor_updates = true
MiqVim.pre_load = true
MiqVim.on_log_body { |body| $vim_log.debug(body) } if Settings.ems.ems_vmware.debug_vim_requests

# Prime the cache before starting the do_work loop
ems.connect
Expand Down
1 change: 1 addition & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
:ems:
:ems_vmware:
:blacklisted_event_names: []
:debug_vim_requests: false
:event_handling:
:event_groups:
:addition:
Expand Down

0 comments on commit 452afa5

Please sign in to comment.