Fix ordering during termination

This commit is contained in:
Joshua Boniface 2023-11-29 16:13:07 -05:00
parent 7a7c975eff
commit 11db3c5b20
1 changed files with 3 additions and 2 deletions

View File

@ -97,8 +97,6 @@ class Logger(object):
# Provide a termination function so all messages are flushed before terminating the main daemon
def terminate(self):
if self.config["file_logging"]:
self.writer.close()
if self.config["zookeeper_logging"]:
self.out("Waiting for Zookeeper message queue to drain", state="s")
@ -112,6 +110,9 @@ class Logger(object):
self.zookeeper_logger.stop()
self.zookeeper_logger.join()
if self.config["file_logging"]:
self.writer.close()
# Output function
def out(self, message, state=None, prefix=""):
# Get the date