def stop(self):
"""Stop the LogCatcher instance and perform resource cleanup."""
self._termination_flag.set()
while self._logger_thread.is_alive():
self._logger_thread.join(timeout=0.5)
log.info("Waiting for LogCatcher thread to exit")
log.info("LogCatcher thread has terminated, bye!")
评论列表
文章目录