MCPcopy
hub / github.com/deadc0de6/dotdrop / dbg

Method dbg

dotdrop/logger.py:69–82  ·  view source on GitHub ↗

debug log

(self, string, force=False)

Source from the content-addressed store, hash-verified

67 sys.stderr.write(f'{cstart}[WARN] {string} {end}{cend}')
68
69 def dbg(self, string, force=False):
70 """debug log"""
71 if not force and not self.debug:
72 return
73 frame = inspect.stack()[1]
74 mod = inspect.getmodule(frame[0]).__name__
75 func = inspect.stack()[1][3]
76 cstart = self._color(self.MAGENTA)
77 cend = self._color(self.RESET)
78 clight = self._color(self.LMAGENTA)
79 bold = self._color(self.BOLD)
80 line = f'{bold}{clight}[DEBUG][{mod}.{func}]'
81 line += f'{cend}{cstart} {string}{cend}\n'
82 sys.stderr.write(line)
83
84 def dry(self, string, end='\n'):
85 """dry run log"""

Callers 15

uninstallMethod · 0.80
_descendMethod · 0.80
_removeMethod · 0.80
_replaceMethod · 0.80
compareMethod · 0.80
_compareMethod · 0.80
_comp_modeMethod · 0.80
_comp_fileMethod · 0.80
_comp_dirMethod · 0.80
_compare_dirs2Method · 0.80
update_pathMethod · 0.80
update_keyMethod · 0.80

Calls 1

_colorMethod · 0.95

Tested by

no test coverage detected