Logs a warning message, 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. Defaults to True.
(self, *args, trace=True, **kwargs)
| 1661 | self.trace() |
| 1662 | |
| 1663 | def warning(self, *args, trace=True, **kwargs): |
| 1664 | """Logs a warning message, and optionally the stack trace of the most recent exception. |
| 1665 | |
| 1666 | Args: |
| 1667 | *args: Variable-length argument list to pass to the logger. |
| 1668 | trace (bool, optional): Whether to log the stack trace of the most recently caught exception. Defaults to True. |
| 1669 | **kwargs: Arbitrary keyword arguments to pass to the logger. |
| 1670 | |
| 1671 | Examples: |
| 1672 | >>> self.warning("This is a warning message") |
| 1673 | >>> self.warning("This is a warning message with a trace", trace=False) |
| 1674 | """ |
| 1675 | self.log.warning(*args, extra={"scan_id": self.scan.id}, **kwargs) |
| 1676 | if trace: |
| 1677 | self.trace() |
| 1678 | |
| 1679 | def hugewarning(self, *args, trace=True, **kwargs): |
| 1680 | """Logs a whole message in emboldened orange text, and optionally the stack trace of the most recent exception. |
no test coverage detected