Enhanced System Logs page

This commit is contained in:
Nguyen Ngo
2025-08-26 12:59:13 -04:00
parent 4fb97f8a3f
commit c77e4e3d60
3 changed files with 148 additions and 47 deletions
+28
View File
@@ -911,6 +911,34 @@ def verify_log_table_exists(self):
print(f"❌ Error verifying log table: {e}")
return False
def log_modal_interaction(self, event_type, description, additional_data=None):
"""Log modal interactions for debugging"""
try:
context = self._get_request_context()
event_data = {
'interaction_type': event_type,
'event_timestamp': datetime.now().isoformat(),
'request_context': context
}
if additional_data:
event_data['additional_data'] = additional_data
message = f"Modal interaction: {event_type} - {description}"
# Log to database
self._log_to_database(
event_type='modal_interaction',
event_category='ui',
description=message,
event_data=event_data,
severity='INFO'
)
except Exception as e:
print(f"Error logging modal interaction: {e}")
# INITIALIZATION FUNCTION
def init_logging(app, db):
"""Initialize the logging system with the Flask app"""