Update scripts/registrator.py
Some checks failed
CI / test (push) Failing after 11s

This commit is contained in:
2026-02-14 10:23:20 +01:00
parent 9d4db87c8b
commit 4f3f55a900

View File

@@ -9,10 +9,28 @@ import requests
# format='%(asctime)s - %(levelname)s - %(message)s')
def configure_logging(log_path="/sdsat/logs/registrator.log"):
current_file = Path(__file__).resolve()
sdsat_root = current_file.parent.parent
log_dir = sdsat_root / "logs"
log_dir.mkdir(parents=True, exist_ok=True)
log_file = log_dir / "registrator.log"
handler = RotatingFileHandler(
log_file,
maxBytes=5 * 1024 * 1024,
backupCount=3,
)
formatter = logging.Formatter(
"%(asctime)s - %(levelname)s - %(message)s"
)
handler.setFormatter(formatter)
logging.basicConfig(
filename=log_path,
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
handlers=[handler],
)
ip='69.69.69.69'