myspace134v / modules /status_logger.py
rdune71's picture
new1
ab6d29f
raw
history blame contribute delete
433 Bytes
import os
import json
from datetime import datetime
def log_request(event, **kwargs):
"""Log request events"""
timestamp = datetime.now().isoformat()
log_entry = {
"timestamp": timestamp,
"event": event,
**kwargs
}
# Print to console (will appear in Hugging Face logs)
print(json.dumps(log_entry))
# In a production environment, you might also send to a logging service