Debug Logging and visibility of SSH Connection errors (#99)

* Debug Logging and visibility of SSH Connection errors

* Updated date in man page
This commit is contained in:
thecliguy
2021-03-02 16:06:40 +00:00
committed by GitHub
parent c483fe1861
commit 83bd049486
7 changed files with 67 additions and 28 deletions
+11 -1
View File
@@ -47,6 +47,7 @@ class OutputBuffer:
self.section: List[str] = []
self.batch = False
self.verbose = False
self.debug = False
self.use_colors = True
self.json = False
self.__level = 0
@@ -167,7 +168,16 @@ class OutputBuffer:
def v(self, s: str, write_now: bool = False) -> 'OutputBuffer':
'''Prints a message if verbose output is enabled.'''
if self.verbose:
if self.verbose or self.debug:
self.info(s)
if write_now:
self.write()
return self
def d(self, s: str, write_now: bool = False) -> 'OutputBuffer':
'''Prints a message if verbose output is enabled.'''
if self.debug:
self.info(s)
if write_now:
self.write()