Content Guard Pro maintains several logs to help you troubleshoot issues and understand plugin behavior.
Types of Logs #
Scan Log #
Records scan operations:
- Scan start and completion
- Batch processing details
- Findings detected
- Performance metrics
- Errors during scans
Error Log #
Records errors and exceptions:
- PHP errors from plugin code
- Database errors
- API failures
- Timeout issues
API Log #
Records external service communications:
- Google Safe Browsing queries
- PhishTank queries
- Response times
- Rate limit events
Audit Log #
Records user actions:
- Quarantine/restore actions
- Ignore actions
- Settings changes
- Manual scan initiations
Accessing Logs #
From Diagnostics Page #
1. Go to Content Guard Pro → Diagnostics
2. Click Logs tab
3. Select log type from dropdown
4. Set date range
5. Click View Logs
Log Viewer Features #
- Search: Find specific entries
- Filter: By severity (Error, Warning, Info)
- Sort: By date, severity, type
- Export: Download as text file
Understanding Log Entries #
Log Entry Format #
[2025-01-15 10:30:45] [INFO] Scan #789 started - Mode: standard
[2025-01-15 10:30:46] [INFO] Processing batch 1/15 (100 items)
[2025-01-15 10:30:52] [INFO] Batch complete: 2 findings, 6.2s, 85MB peak
[2025-01-15 10:31:05] [WARNING] Query time threshold exceeded: 450ms
[2025-01-15 10:31:05] [INFO] Throttling activated: reducing batch size
Severity Levels #
| Level | Meaning | Action |
| ——- | ——— | ——– |
| DEBUG | Detailed diagnostic info | Usually hidden |
| INFO | Normal operations | No action needed |
| WARNING | Potential issues | Monitor, may need attention |
| ERROR | Something went wrong | Investigate |
| CRITICAL | Serious failure | Immediate attention |
Common Log Patterns #
Successful Scan #
[INFO] Scan #789 started - Mode: standard
[INFO] Processing batch 1/15 (100 items)
[INFO] Batch complete: 0 findings, 4.5s, 64MB peak
[INFO] Processing batch 2/15 (100 items)
...
[INFO] Scan #789 completed - Duration: 5m 30s, 1500 items, 5 findings
Throttling Event #
[WARNING] Query time threshold exceeded: 450ms (threshold: 300ms)
[INFO] Throttling activated: batch size 100 → 50
[INFO] Processing batch 5/30 (50 items)
Memory Warning #
[WARNING] Memory usage 75% of limit (96MB of 128MB)
[INFO] Safe Mode activated
[INFO] Batch size reduced: 100 → 25
API Error #
[ERROR] Google Safe Browsing API error: 403 Forbidden
[WARNING] API quota may be exceeded
[INFO] Using cached results where available
Database Error #
[ERROR] Database query failed: MySQL server has gone away
[WARNING] Scan interrupted - progress saved
[INFO] Will retry on next cron execution
Enabling Verbose Logging #
For more detailed logs:
1. Go to Content Guard Pro → Settings
2. Enable Debug Mode (in Diagnostics section)
3. Save changes
⚠️ Warning: Verbose logging:
- Creates larger log files
- May include sensitive data
- Should only be enabled when troubleshooting
- Disable after debugging
Log Retention #
Default Retention #
| Log Type | Retention |
| ———- | ———– |
| Scan Log | 30 days |
| Error Log | 30 days |
| API Log | 7 days |
| Audit Log | 365 days |
Clearing Logs #
1. Go to Diagnostics → Logs
2. Click Clear Logs
3. Select which logs to clear
4. Confirm action
Exporting Logs #
For Support Requests #
1. Go to Diagnostics → Logs
2. Select relevant log and date range
3. Click Export
4. Attach to support ticket
What to Include #
When reporting issues, export:
- Error Log (last 7 days)
- Scan Log (last 3 days)
- Diagnostic report
Log Analysis Tips #
Finding Patterns #
Look for:
- Repeated errors (indicates ongoing issue)
- Correlation with times (peak hours?)
- Resource warnings before failures
Performance Trends #
Check scan logs for:
- Increasing batch times
- Memory usage trends
- Throttling frequency
Troubleshooting Workflow #
1. Identify the issue – What went wrong?
2. Find the timeframe – When did it happen?
3. Filter logs – Show only relevant period
4. Look for errors – Start with ERROR level
5. Check context – What happened before the error?
6. Identify pattern – Is it recurring?
Log Privacy #
What’s Logged #
- Operation types and timestamps
- Performance metrics
- Error messages
- Domain names (from findings)
What’s NOT Logged #
- Full content text
- User passwords or data
- Complete URLs (truncated)
- API keys
For GDPR Compliance #
- Logs may contain domain names from content
- Consider this in your data retention policy
- Clear logs before providing site access to others
Integrating with Server Logs #
PHP Error Log #
Content Guard Pro errors also appear in PHP error log:
tail -f /var/log/php/error.log | grep "content-guard-pro"
WordPress Debug Log #
Enable WordPress debug logging:
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Then check wp-content/debug.log
Action Scheduler Logs #
For background task issues:
1. Go to Tools → Scheduled Actions
2. Filter by “content_guard_pro”
3. Check action logs for failures