File size: 433 Bytes
73f9fb2
ab6d29f
73f9fb2
 
ab6d29f
 
f1fb766
ab6d29f
 
 
 
 
f1fb766
ab6d29f
 
f1fb766
ab6d29f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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