Update app.py
Browse files
app.py
CHANGED
@@ -159,13 +159,13 @@ initial_state = {
|
|
159 |
}
|
160 |
|
161 |
# Initialize log_messages outside initial_state
|
162 |
-
log_messages =
|
163 |
|
164 |
# Logging function to store messages in memory
|
165 |
def log_message(message, log_messages):
|
166 |
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
167 |
log_entry = f"{timestamp} - {message}"
|
168 |
-
log_messages.append(log_entry)
|
169 |
return log_messages
|
170 |
|
171 |
# Function to save logs to file
|
|
|
159 |
}
|
160 |
|
161 |
# Initialize log_messages outside initial_state
|
162 |
+
log_messages = []
|
163 |
|
164 |
# Logging function to store messages in memory
|
165 |
def log_message(message, log_messages):
|
166 |
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
167 |
log_entry = f"{timestamp} - {message}"
|
168 |
+
log_messages.append(log_entry)
|
169 |
return log_messages
|
170 |
|
171 |
# Function to save logs to file
|