#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-present ScyllaDB
#

#
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0

from pathlib import Path
from datetime import datetime
from scylla_util import *

if __name__ == '__main__':
    log = scylladir_p() / 'scylla-server.log'
    if log.exists() and log.stat().st_size > 0:
        dt = datetime.today().isoformat()
        log.rename(scylladir_p() / f'scylla-server.log.{dt}')
