add debug in aws cli custom mode
This commit is contained in:
parent
1d37eea6f4
commit
ddc42ac5aa
|
@ -127,8 +127,11 @@ sub check_options {
|
||||||
|
|
||||||
sub execute {
|
sub execute {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
my $cmd_options = $options{cmd_options};
|
||||||
|
$cmd_options .= " --debug" if ($self->{output}->is_debug());
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => "Command line: '" . $self->{option_results}->{command} . " " . $options{cmd_options} . "'", debug => 1);
|
$self->{output}->output_add(long_msg => "Command line: '" . $self->{option_results}->{command} . " " . $cmd_options . "'", debug => 1);
|
||||||
|
|
||||||
my ($response) = centreon::plugins::misc::execute(
|
my ($response) = centreon::plugins::misc::execute(
|
||||||
output => $self->{output},
|
output => $self->{output},
|
||||||
|
@ -136,8 +139,8 @@ sub execute {
|
||||||
sudo => $self->{option_results}->{sudo},
|
sudo => $self->{option_results}->{sudo},
|
||||||
command => $self->{option_results}->{command},
|
command => $self->{option_results}->{command},
|
||||||
command_path => $self->{option_results}->{command_path},
|
command_path => $self->{option_results}->{command_path},
|
||||||
command_options => $options{cmd_options},
|
command_options => $cmd_options,
|
||||||
redirect_stderr => 0
|
redirect_stderr => 1
|
||||||
);
|
);
|
||||||
|
|
||||||
my $raw_results;
|
my $raw_results;
|
||||||
|
|
Loading…
Reference in New Issue