diff --git a/run.py b/run.py index cf7cb8cd92d67fbdf5ac6482e3384007f9b23bcf..f5272d5d51efe88e194dd2eaa2e0ce7ddd97b0f8 100644 --- a/run.py +++ b/run.py @@ -40,12 +40,12 @@ def check_dir(user, interval): @socketio.on('user connect') def handle_my_custom_event(json, methods=['GET', 'POST']): username = json["user"] - print('User ' + username + ' connected.') + print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' connected.') @socketio.on('user data') def ingest_data(json, methods=['GET', 'POST']): - print ('Queue request received: ', str(json)) + print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json)) try: fullname = json["fullname"] @@ -65,11 +65,11 @@ def ingest_data(json, methods=['GET', 'POST']): file.write(reason) file.close() - print ('User ' + username + ' added to queue') + print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue') socketio.emit("creating account") except Exception as e: - print("Error in directory creation: ", e) + print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in directory creation: ", e) socketio.emit("Account creation failed") @@ -78,7 +78,7 @@ def creation_confirmation(json, methods=['GET', 'POST']): username = json["username"] if check_dir(username, 10): - print ('Account successfully created for ' + username) + print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username) socketio.emit("Account created") else: socketio.emit("Account creation failed")