Fix ordering during termination
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user