MCPcopy
hub / github.com/Gallopsled/pwntools / install_default_handler

Function install_default_handler

pwnlib/log.py:694–707  ·  view source on GitHub ↗

install_default_handler() Instantiates a :class:`Handler` and :class:`Formatter` and installs them for the ``pwnlib`` root logger. This function is automatically called from when importing :mod:`pwn`.

()

Source from the content-addressed store, hash-verified

692console.setFormatter(formatter)
693
694def install_default_handler():
695 '''install_default_handler()
696
697 Instantiates a :class:`Handler` and :class:`Formatter` and installs them for
698 the ``pwnlib`` root logger. This function is automatically called from when
699 importing :mod:`pwn`.
700 '''
701 logger = logging.getLogger('pwnlib')
702
703 if console not in logger.handlers:
704 logger.addHandler(console)
705 logger.addHandler(log_file)
706
707 logger.setLevel(1)

Callers

nothing calls this directly

Calls 2

addHandlerMethod · 0.80
setLevelMethod · 0.80

Tested by

no test coverage detected