debug log
(self, string, force=False)
| 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""" |
no test coverage detected