def conf_impacket_logger(self, formatter): LOG.setLevel(logging.INFO) LOG.propagate = False fileHandler = logging.FileHandler("./logs/mitmf.log") streamHandler = logging.StreamHandler(sys.stdout) fileHandler.setFormatter(formatter) streamHandler.setFormatter(formatter) LOG.addHandler(fileHandler) LOG.addHandler(streamHandler)
def configureLogging(self, formatter): #yes I know this looks awful, yuck LOG.setLevel(logging.INFO) LOG.propagate = False logging.getLogger('smbserver').setLevel(logging.INFO) logging.getLogger('impacket').setLevel(logging.INFO) fileHandler = logging.FileHandler("./logs/mitmf.log") streamHandler = logging.StreamHandler(sys.stdout) fileHandler.setFormatter(formatter) streamHandler.setFormatter(formatter) LOG.addHandler(fileHandler) LOG.addHandler(streamHandler)