mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
Update logger.py
This commit is contained in:
parent
eb94b72bcf
commit
1887f8e3aa
1 changed files with 1 additions and 1 deletions
2
dist/ba_root/mods/tools/logger.py
vendored
2
dist/ba_root/mods/tools/logger.py
vendored
|
|
@ -93,7 +93,7 @@ class dumplogs(threading.Thread):
|
||||||
else:
|
else:
|
||||||
log_path = SERVER_DATA_PATH + "logs.log"
|
log_path = SERVER_DATA_PATH + "logs.log"
|
||||||
if os.path.exists(log_path):
|
if os.path.exists(log_path):
|
||||||
if os.stat(log_path).st_size > 1000:
|
if os.stat(log_path).st_size > 1000000:
|
||||||
shutil.copy(log_path, log_path+str(datetime.datetime.now()))
|
shutil.copy(log_path, log_path+str(datetime.datetime.now()))
|
||||||
os.remove(log_path)
|
os.remove(log_path)
|
||||||
with open(log_path, mode="a+", encoding="utf-8") as file:
|
with open(log_path, mode="a+", encoding="utf-8") as file:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue