This commit is contained in:
brusnitsyn
2026-06-10 16:53:03 +09:00
parent ff810e59bc
commit b5d1f61a82
9 changed files with 640 additions and 151 deletions

View File

@@ -144,5 +144,14 @@ class MigrationLogger:
except Exception as e:
return f"Ошибка при чтении лог-файла: {e}"
def close(self):
"""Закрытие и удаление всех хендлеров логгера."""
for handler in list(self.logger.handlers):
try:
handler.close()
except Exception:
pass
self.logger.removeHandler(handler)
# ============================================================================