我是看门狗的第一次使用者。我想知道看门狗如何处理多个处理程序。它会是这样的:
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
path = sys.argv[1] if len(sys.argv) > 1 else '.'
event_handler_1 = LoggingEventHandler()
**event_handler_2 = LoggingEventHandler()**
observer = Observer()
observer.schedule(event_handler_1, path, recursive=True)
**observer.schedule(event_handler_2, path, recursive=True)**
observer.start()
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
observer.stop()
observer.join()
非常感谢您的帮助