mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Reduce salt-ssh debug log verbosity
Anything that involves the SHIM should be logged to TRACE
This commit is contained in:
parent
83ef7cb114
commit
9b9c30f5ad
@ -285,7 +285,11 @@ class Shell(object):
|
||||
logmsg = 'Executing command: {0}'.format(cmd)
|
||||
if self.passwd:
|
||||
logmsg = logmsg.replace(self.passwd, ('*' * 6))
|
||||
log.debug(logmsg)
|
||||
if 'decode("base64")' in logmsg:
|
||||
log.debug('Executed SHIM command. Command logged to TRACE')
|
||||
log.trace(logmsg)
|
||||
else:
|
||||
log.debug(logmsg)
|
||||
|
||||
ret = self._run_cmd(cmd)
|
||||
return ret
|
||||
|
@ -216,7 +216,12 @@ class Terminal(object):
|
||||
'Child Forked! PID: {0} STDOUT_FD: {1} STDERR_FD: '
|
||||
'{2}'.format(self.pid, self.child_fd, self.child_fde)
|
||||
)
|
||||
log.debug('Terminal Command: {0}'.format(' '.join(self.args)))
|
||||
terminal_command = ' '.join(self.args)
|
||||
if 'decode("base64")' in terminal_command:
|
||||
log.debug('VT: Salt-SSH SHIM Terminal Command executed. Logged to TRACE')
|
||||
log.trace('Terminal Command: {0}'.format(terminal_command))
|
||||
else:
|
||||
log.debug('Terminal Command: {0}'.format(terminal_command))
|
||||
# <---- Spawn our terminal -------------------------------------------
|
||||
|
||||
# ----- Setup Logging ----------------------------------------------->
|
||||
|
Loading…
Reference in New Issue
Block a user