11 lines
358 B
Python
11 lines
358 B
Python
|
from .. import Config
|
||
|
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')
|