10 lines
336 B
Python
10 lines
336 B
Python
|
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')
|