MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / critical

Method critical

bbot/modules/base.py:1731–1745  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers 4

_workerMethod · 0.45
server_processMethod · 0.45
run_and_returnMethod · 0.45
run_and_yieldMethod · 0.45

Calls 1

traceMethod · 0.95

Tested by

no test coverage detected