mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't log command when output_loglevel == 'quiet'
This commit is contained in:
parent
f59cee28db
commit
cf28eb74aa
1 changed files with 11 additions and 9 deletions
|
@ -610,7 +610,7 @@ def _run(cmd,
|
|||
ret['retcode'] = 1
|
||||
return ret
|
||||
|
||||
if output_encoding is not None:
|
||||
if output_loglevel != 'quiet' and output_encoding is not None:
|
||||
log.debug('Decoding output from command %s using %s encoding',
|
||||
cmd, output_encoding)
|
||||
|
||||
|
@ -626,10 +626,11 @@ def _run(cmd,
|
|||
proc.stdout,
|
||||
encoding=output_encoding,
|
||||
errors='replace')
|
||||
log.error(
|
||||
'Failed to decode stdout from command %s, non-decodable '
|
||||
'characters have been replaced', cmd
|
||||
)
|
||||
if output_loglevel != 'quiet':
|
||||
log.error(
|
||||
'Failed to decode stdout from command %s, non-decodable '
|
||||
'characters have been replaced', cmd
|
||||
)
|
||||
|
||||
try:
|
||||
err = salt.utils.stringutils.to_unicode(
|
||||
|
@ -643,10 +644,11 @@ def _run(cmd,
|
|||
proc.stderr,
|
||||
encoding=output_encoding,
|
||||
errors='replace')
|
||||
log.error(
|
||||
'Failed to decode stderr from command %s, non-decodable '
|
||||
'characters have been replaced', cmd
|
||||
)
|
||||
if output_loglevel != 'quiet':
|
||||
log.error(
|
||||
'Failed to decode stderr from command %s, non-decodable '
|
||||
'characters have been replaced', cmd
|
||||
)
|
||||
|
||||
if rstrip:
|
||||
if out is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue