mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Add log_only to debug messages (#25545)
Fixes #25544 When `debug` is enabled the debug messages triggered from `bin/ansible-connection` should be logged only to file and not on stdout.
This commit is contained in:
parent
343a709800
commit
9e8cc26720
3 changed files with 7 additions and 6 deletions
|
@ -174,9 +174,9 @@ class Display:
|
|||
def vvvvvv(self, msg, host=None):
|
||||
return self.verbose(msg, host=host, caplevel=5)
|
||||
|
||||
def debug(self, msg):
|
||||
def debug(self, msg, log_only=False):
|
||||
if C.DEFAULT_DEBUG:
|
||||
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG)
|
||||
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG, log_only=log_only)
|
||||
|
||||
def verbose(self, msg, host=None, caplevel=2):
|
||||
if self.verbosity > caplevel:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue