MCPcopy Index your code
hub / github.com/blacklanternsecurity/bbot / trace

Method trace

bbot/modules/base.py:1711–1729  ·  view source on GitHub ↗

Logs the stack trace of the most recently caught exception. This method captures the type, value, and traceback of the most recent exception and logs it using the trace level. It is typically used for debugging purposes. Anything logged using this method will always be written to t

(self, msg=None)

Source from the content-addressed store, hash-verified

1709 self.trace()
1710
1711 def trace(self, msg=None):
1712 """Logs the stack trace of the most recently caught exception.
1713
1714 This method captures the type, value, and traceback of the most recent exception and logs it using the trace level. It is typically used for debugging purposes.
1715
1716 Anything logged using this method will always be written to the scan's `debug.log`, even if debugging is not enabled.
1717
1718 Examples:
1719 >>> try:
1720 >>> 1 / 0
1721 >>> except ZeroDivisionError:
1722 >>> self.trace()
1723 """
1724 if msg is None:
1725 e_type, e_val, e_traceback = exc_info()
1726 if e_type is not None:
1727 self.log.trace(traceback.format_exc())
1728 else:
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.

Callers 15

require_api_keyMethod · 0.95
_setupMethod · 0.95
api_requestMethod · 0.95
api_page_iterMethod · 0.95
debugMethod · 0.95
verboseMethod · 0.95
hugeverboseMethod · 0.95
infoMethod · 0.95
hugeinfoMethod · 0.95
successMethod · 0.95
hugesuccessMethod · 0.95
warningMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected