API Call Logs

API logs are recorded to log files

📋 Log File Location

All API call logs are now recorded to log files instead of the database.

Log File: logs/api-calls.log
Rolling Pattern: logs/api-calls-YYYY-MM-DD.i.log
Format: JSON (one log entry per line)
Retention: 7 days, max 500MB total

How to View Logs

View recent logs:

tail -f logs/api-calls.log

View logs from last 3 days:

find logs -name "api-calls*.log" -mtime -3 -exec tail -n 100  \;

Search for specific API path:

grep -r "\"path\":\"/api/project/whatsapp" logs/api-calls*.log

View logs with status code:

grep -r "\"status\":200" logs/api-calls*.log

Note: Log entries are in JSON format, making them easy to parse and analyze with tools like jq or custom scripts.