mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Clean up debug logging around _low_level_execute_command
We were logging the command to be executed many times, which made debug logs very hard to read. Now we do it only once. Also makes the logged ssh command line cut-and-paste-able (the lack of which has confused a number of people by now; the problem being that we pass the command as a single argument to execve(), so it doesn't need an extra level of quoting as it does when you try to run it by hand).
This commit is contained in:
parent
c402325085
commit
37c4e9aee3
2 changed files with 7 additions and 20 deletions
|
@ -319,7 +319,7 @@ class Connection(ConnectionBase):
|
|||
Starts the command and communicates with it until it ends.
|
||||
'''
|
||||
|
||||
display_cmd = map(pipes.quote, cmd[:-1]) + [cmd[-1]]
|
||||
display_cmd = map(pipes.quote, cmd)
|
||||
display.vvv('SSH: EXEC {0}'.format(' '.join(display_cmd)), host=self.host)
|
||||
|
||||
# Start the given command. If we don't need to pipeline data, we can try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue