diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 4e86b4b863..3b0d481bae 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,8 @@ +2013-03-11 Ramon Novoa + + * unix/pandora_agent: Added debugging information to the execution of + module_exec modules. + 2012-08-03 Ramon Novoa * win32/modules/pandora_module_logevent.cc: Get the EventID from the diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f5a8219bd5..8837c9cd20 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1322,9 +1322,11 @@ sub module_exec ($) { # Execute the command if ($module->{'timeout'} == 0) { @data = `$params 2> $DevNull`; + log_message ('debug', "Executing module " . $module->{'name'} . " ($params 2> $DevNull)") if ($Conf{'debug'} eq '1'); } else { my $cmd = quotemeta ($params); @data = `$Conf{'pandora_exec'} $module->{'timeout'} $cmd 2> $DevNull`; + log_message ('debug', "Executing module " . $module->{'name'} . ' (' . $Conf{'pandora_exec'} . ' ' . $module->{'timeout'} . " $cmd 2> $DevNull)") if ($Conf{'debug'} eq '1'); } # Something went wrong or no data