v2026.06
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user