import datetime
def start_logger():
    date = datetime.datetime.now()
    filename = str(date) + '-log.txt'
    with open(filename, 'a+') as f:
        f.write("------------------ASMR Log--------------\n")
        f.write("Log started at: "+str(date)+"\n")
    f.close()
    return filename

def add_log(filename, data):
    with open(filename, 'a+') as f:
        f.write(data+"\n")
    f.close()

def stop_logger(filename):
    date = datetime.datetime.now()
    with open(filename, "a+") as f:
        f.write("Acquisition finished at: "+str(date)+"\n")
        f.write("----------------------------------------")
    f.close()
