Logs a whole message in emboldened red text, and optionally the stack trace of the most recent exception. Args: *args: Variable-length argument list to pass to the logger. trace (bool, optional): Whether to log the stack trace of the most recently caught exception. D
(self, *args, trace=True, **kwargs)
| 1729 | self.log.trace(msg) |
| 1730 | |
| 1731 | def critical(self, *args, trace=True, **kwargs): |
| 1732 | """Logs a whole message in emboldened red text, and optionally the stack trace of the most recent exception. |
| 1733 | |
| 1734 | Args: |
| 1735 | *args: Variable-length argument list to pass to the logger. |
| 1736 | trace (bool, optional): Whether to log the stack trace of the most recently caught exception. Defaults to True. |
| 1737 | **kwargs: Arbitrary keyword arguments to pass to the logger. |
| 1738 | |
| 1739 | Examples: |
| 1740 | >>> self.critical("This is a critical message") |
| 1741 | >>> self.critical("This is a critical message with a trace", trace=False) |
| 1742 | """ |
| 1743 | self.log.critical(*args, extra={"scan_id": self.scan.id}, **kwargs) |
| 1744 | if trace: |
| 1745 | self.trace() |
| 1746 | |
| 1747 | @classmethod |
| 1748 | def help_text(self): |
no test coverage detected