Browse Source

Add mail information to the logger

mario forzanini 2 years ago
parent
commit
a90bf6f5a3
1 changed files with 6 additions and 4 deletions
  1. 6 4
      lcmlog-server

+ 6 - 4
lcmlog-server

@@ -263,10 +263,12 @@ def method_get(kind, user_to_find, date, tags):
 
 # Write log
 def method_post(kind, user_name, date, tags, log, send_mail):
-	name = log_create(kind, user_name, date, tags, log)
-	if send_mail:
-		log_mail(kind, user_name, date, tags, log)
-	logger.info("POST successful: hash " + name)
+        name = log_create(kind, user_name, date, tags, log)
+        logger.info("POST successful: hash " + name)
+        if send_mail:
+                log_mail(kind, user_name, date, tags, log)
+                logger.info("MAIL sent.")
+
 
 
 # Generate .data file