m7mdal7aj commited on
Commit
5bc84a2
·
verified ·
1 Parent(s): 2d88f01

Update my_model/utilities/gen_utilities.py

Browse files
Files changed (1) hide show
  1. my_model/utilities/gen_utilities.py +12 -0
my_model/utilities/gen_utilities.py CHANGED
@@ -56,6 +56,18 @@ logging.basicConfig(filename='app.log', level=logging.INFO)
56
  def log_click(widget_name):
57
  logging.info(f'{widget_name} was clicked.')
58
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  def show_image(image):
61
  """
 
56
  def log_click(widget_name):
57
  logging.info(f'{widget_name} was clicked.')
58
 
59
+ import csv
60
+ from datetime import datetime
61
+
62
+ log_file_path = 'app_log.csv'
63
+
64
+ def log_to_csv(event, message):
65
+ with open(log_file_path, 'a', newline='') as file:
66
+ writer = csv.writer(file)
67
+ writer.writerow([datetime.now(), event, message])
68
+
69
+ ########################
70
+
71
 
72
  def show_image(image):
73
  """