[82] fix logging error

pull/737/head
meisnate12 3 years ago
parent f7dbd54fe2
commit b0ff508306

@ -1 +1 @@
1.15.1-develop81
1.15.1-develop82

@ -77,7 +77,6 @@ class MyLogger:
self._logger.removeHandler(self.main_handler)
def add_library_handler(self, library_key):
if not self.library_handlers:
os.makedirs(os.path.join(self.log_dir, library_key, COLLECTION_DIR), exist_ok=True)
self.library_handlers[library_key] = self._get_handler(os.path.join(self.log_dir, library_key, LIBRARY_LOG))
self._logger.addHandler(self.library_handlers[library_key])
@ -100,8 +99,8 @@ class MyLogger:
def add_collection_handler(self, library_key, collection_key):
collection_dir = os.path.join(self.log_dir, library_key, COLLECTION_DIR, collection_key)
if library_key not in self.collection_handlers:
os.makedirs(collection_dir, exist_ok=True)
if library_key not in self.collection_handlers:
self.collection_handlers[library_key] = {}
self.collection_handlers[library_key][collection_key] = self._get_handler(os.path.join(collection_dir, COLLECTION_LOG))
self._logger.addHandler(self.collection_handlers[library_key][collection_key])

Loading…
Cancel
Save