# Log Files Documentation

## Log Files Overview

| Log File | Purpose | Retention |
|----------|---------|-----------|
| errors.log | PHP errors, database errors, system exceptions | 30 days |
| access.log | User login/logout, page access, API calls | 7 days |
| ai.log | AI API requests, responses, errors | 30 days |
| cron.log | Cron job execution logs | 30 days |

## Log Rotation

Logs are automatically rotated by the cleanup script:
- Daily rotation at midnight
- Old logs archived with date suffix
- Logs older than 30 days are deleted

## Log Format

### errors.log