Copy detailed logging to persistent.py so local can benefit, too. (#50614)
This commit is contained in:
parent
27f9c3fba0
commit
19d7197d97
1 changed files with 10 additions and 2 deletions
|
@ -133,8 +133,16 @@ class Connection(ConnectionBase):
|
||||||
result = {'error': to_text(stderr, errors='surrogate_then_replace')}
|
result = {'error': to_text(stderr, errors='surrogate_then_replace')}
|
||||||
|
|
||||||
if 'messages' in result:
|
if 'messages' in result:
|
||||||
for msg in result.get('messages'):
|
for level, message in result['messages']:
|
||||||
display.vvvv('%s' % msg, host=self._play_context.remote_addr)
|
if level == 'log':
|
||||||
|
display.display(message, log_only=True)
|
||||||
|
elif level in ('debug', 'v', 'vv', 'vvv', 'vvvv', 'vvvvv', 'vvvvvv'):
|
||||||
|
getattr(display, level)(message, host=self._play_context.remote_addr)
|
||||||
|
else:
|
||||||
|
if hasattr(display, level):
|
||||||
|
getattr(display, level)(message)
|
||||||
|
else:
|
||||||
|
display.vvvv(message, host=self._play_context.remote_addr)
|
||||||
|
|
||||||
if 'error' in result:
|
if 'error' in result:
|
||||||
if self._play_context.verbosity > 2:
|
if self._play_context.verbosity > 2:
|
||||||
|
|
Loading…
Reference in a new issue