Fixed formatting of logfile

This commit is contained in:
phixxy 2023-07-16 16:35:40 -07:00
parent f523fecd70
commit d4cca24392

View file

@ -68,7 +68,7 @@ async def upload_ftp(local_filename, server_folder, server_filename):
async def handle_error(error): async def handle_error(error):
print(error) print(error)
current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
log_line = current_time + ': ' + str(error) log_line = current_time + ': ' + str(error) + '\n'
with open("databases/error_log.txt", 'a') as f: with open("databases/error_log.txt", 'a') as f:
f.write(log_line) f.write(log_line)
return error return error