mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-23 00:02:37 +00:00
18 lines
453 B
Python
Executable File
18 lines
453 B
Python
Executable File
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
#
|
|
# Copyright (C) 2020-present ScyllaDB
|
|
#
|
|
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
|
|
|
|
from datetime import datetime
|
|
from scylla_util import scylladir_p
|
|
|
|
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}')
|