python3-10.pyscalpel.logger
1import sys 2from pyscalpel.java import import_java 3 4 5# Define a default logger to use if for some reason the logger is not initialized 6# (e.g. running the script from pdoc) 7class Logger: # pragma: no cover 8 """Provides methods for logging messages to the Burp Suite output and standard streams.""" 9 10 def all(self, msg: str): 11 """Prints the message to the standard output 12 13 Args: 14 msg (str): The message to print 15 """ 16 print(f"(default): {msg}") 17 18 def trace(self, msg: str): 19 """Prints the message to the standard output 20 21 Args: 22 msg (str): The message to print 23 """ 24 print(f"(default): {msg}") 25 26 def debug(self, msg: str): 27 """Prints the message to the standard output 28 29 Args: 30 msg (str): The message to print 31 """ 32 print(f"(default): {msg}") 33 34 def info(self, msg: str): 35 """Prints the message to the standard output 36 37 Args: 38 msg (str): The message to print 39 """ 40 print(f"(default): {msg}") 41 42 def warn(self, msg: str): 43 """Prints the message to the standard output 44 45 Args: 46 msg (str): The message to print 47 """ 48 print(f"(default): {msg}") 49 50 def fatal(self, msg: str): 51 """Prints the message to the standard output 52 53 Args: 54 msg (str): The message to print 55 """ 56 print(f"(default): {msg}") 57 58 def error(self, msg: str): 59 """Prints the message to the standard error 60 61 Args: 62 msg (str): The message to print 63 """ 64 print(f"(default): {msg}", file=sys.stderr) 65 66 67try: 68 logger: Logger = import_java("lexfo.scalpel", "ScalpelLogger", Logger) 69except ImportError as ex: # pragma: no cover 70 logger: Logger = Logger() 71 logger.error("(default): Couldn't import logger") 72 logger.error(str(ex))
class
Logger:
8class Logger: # pragma: no cover 9 """Provides methods for logging messages to the Burp Suite output and standard streams.""" 10 11 def all(self, msg: str): 12 """Prints the message to the standard output 13 14 Args: 15 msg (str): The message to print 16 """ 17 print(f"(default): {msg}") 18 19 def trace(self, msg: str): 20 """Prints the message to the standard output 21 22 Args: 23 msg (str): The message to print 24 """ 25 print(f"(default): {msg}") 26 27 def debug(self, msg: str): 28 """Prints the message to the standard output 29 30 Args: 31 msg (str): The message to print 32 """ 33 print(f"(default): {msg}") 34 35 def info(self, msg: str): 36 """Prints the message to the standard output 37 38 Args: 39 msg (str): The message to print 40 """ 41 print(f"(default): {msg}") 42 43 def warn(self, msg: str): 44 """Prints the message to the standard output 45 46 Args: 47 msg (str): The message to print 48 """ 49 print(f"(default): {msg}") 50 51 def fatal(self, msg: str): 52 """Prints the message to the standard output 53 54 Args: 55 msg (str): The message to print 56 """ 57 print(f"(default): {msg}") 58 59 def error(self, msg: str): 60 """Prints the message to the standard error 61 62 Args: 63 msg (str): The message to print 64 """ 65 print(f"(default): {msg}", file=sys.stderr)
Provides methods for logging messages to the Burp Suite output and standard streams.
def
all(self, msg: str):
11 def all(self, msg: str): 12 """Prints the message to the standard output 13 14 Args: 15 msg (str): The message to print 16 """ 17 print(f"(default): {msg}")
Prints the message to the standard output
Args: msg (str): The message to print
def
trace(self, msg: str):
19 def trace(self, msg: str): 20 """Prints the message to the standard output 21 22 Args: 23 msg (str): The message to print 24 """ 25 print(f"(default): {msg}")
Prints the message to the standard output
Args: msg (str): The message to print
def
debug(self, msg: str):
27 def debug(self, msg: str): 28 """Prints the message to the standard output 29 30 Args: 31 msg (str): The message to print 32 """ 33 print(f"(default): {msg}")
Prints the message to the standard output
Args: msg (str): The message to print
def
info(self, msg: str):
35 def info(self, msg: str): 36 """Prints the message to the standard output 37 38 Args: 39 msg (str): The message to print 40 """ 41 print(f"(default): {msg}")
Prints the message to the standard output
Args: msg (str): The message to print
def
warn(self, msg: str):
43 def warn(self, msg: str): 44 """Prints the message to the standard output 45 46 Args: 47 msg (str): The message to print 48 """ 49 print(f"(default): {msg}")
Prints the message to the standard output
Args: msg (str): The message to print
logger: python3-10.pyscalpel.logger.Logger =
None