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`.
()
| 692 | console.setFormatter(formatter) |
| 693 | |
| 694 | def 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) |
nothing calls this directly
no test coverage detected