2022-06-11 18:08:24 +01:00
|
|
|
from main import Config
|
2022-06-11 11:29:15 +01:00
|
|
|
from ..data import data
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
def read(filename:str):
|
|
|
|
with open(f'./{data}/logs/{filename}') as file:
|
|
|
|
return file.readlines()
|
|
|
|
|
|
|
|
def write(filename:str, message:str):
|
|
|
|
with open(f'./{data}/logs/{filename}', 'a+') as file:
|
|
|
|
file.write(f'{datetime.now().strftime("%Y-%m-%d-%X")}: {message}\n')
|