mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
more debug logs for free, network_cli, paramiko and add hostname context to debugging messages (#39205)
* Add hostname context to debugging messages * Set paramiko's channel
This commit is contained in:
@@ -191,9 +191,12 @@ class Display:
|
||||
def vvvvvv(self, msg, host=None):
|
||||
return self.verbose(msg, host=host, caplevel=5)
|
||||
|
||||
def debug(self, msg):
|
||||
def debug(self, msg, host=None):
|
||||
if C.DEFAULT_DEBUG:
|
||||
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG)
|
||||
if host is None:
|
||||
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG)
|
||||
else:
|
||||
self.display("%6d %0.5f [%s]: %s" % (os.getpid(), time.time(), host, msg), color=C.COLOR_DEBUG)
|
||||
|
||||
def verbose(self, msg, host=None, caplevel=2):
|
||||
if self.verbosity > caplevel:
|
||||
|
||||
Reference in New Issue
Block a user