Logs a success 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 False.
(self, *args, trace=False, **kwargs)
| 1629 | self.trace() |
| 1630 | |
| 1631 | def success(self, *args, trace=False, **kwargs): |
| 1632 | """Logs a success message, and optionally the stack trace of the most recent exception. |
| 1633 | |
| 1634 | Args: |
| 1635 | *args: Variable-length argument list to pass to the logger. |
| 1636 | trace (bool, optional): Whether to log the stack trace of the most recently caught exception. Defaults to False. |
| 1637 | **kwargs: Arbitrary keyword arguments to pass to the logger. |
| 1638 | |
| 1639 | Examples: |
| 1640 | >>> self.success("Operation completed successfully") |
| 1641 | >>> self.success("Operation completed with a trace", trace=True) |
| 1642 | """ |
| 1643 | self.log.success(*args, extra={"scan_id": self.scan.id}, **kwargs) |
| 1644 | if trace: |
| 1645 | self.trace() |
| 1646 | |
| 1647 | def hugesuccess(self, *args, trace=False, **kwargs): |
| 1648 | """Logs a whole message in emboldened green text, and optionally the stack trace of the most recent exception. |