Audit Logging#
Entity Builder provides comprehensive audit logging with a two-tier architecture.
Two-Tier Architecture#
Session Level (EbLog)#
Each apply/rollback/import creates an EbLog record:
| Field | Description |
|---|---|
label |
Human-readable description |
definition_id |
Source definition |
action |
apply, rollback, import |
status |
pending, success, partial, failed |
operation_count |
Total operations |
success_count |
Successful operations |
failure_count |
Failed operations |
started |
Start timestamp |
completed |
End timestamp |
uid |
User who performed action |
Operation Level (Watchdog)#
Each individual operation is logged to Drupal's watchdog:
- Label: Short operation name
- Details: Key identifiers
- JSON Data: Full operation configuration
- Messages: Contextual information
Viewing Logs#
Via UI#
- Navigate to Configuration > Development > Entity Builder > Log
- Click on a log entry to see details
- Click Show to see individual operations
Operation Details View#
The "Show" page displays operations as collapsible fieldsets:
Via Drush#
Log Status#
| Status | Meaning |
|---|---|
pending |
In progress |
success |
All operations succeeded |
partial |
Some operations failed |
failed |
All operations failed |
What Gets Logged#
Apply Operations#
Rollback Operations#
Import Operations#
Log Retention#
By default, logs are kept for 30 days.
Configure Retention#
In Configuration > Development > Entity Builder > Settings:
Manual Cleanup#
Debug Mode#
Enable debug mode for verbose logging:
Settings:
Debug output includes:
- Dependency resolution steps
- Change detection results
- Validation details
- Operation data before/after
Querying Logs#
By Definition#
By User#
Recent Logs#
Integration with Watchdog#
Entity Builder uses logger.channel.eb for watchdog logging:
Log Severity Levels#
| Level | Usage |
|---|---|
emergency |
System unusable |
alert |
Action required immediately |
critical |
Critical conditions |
error |
Operation failed |
warning |
Warning conditions |
notice |
Normal but significant |
info |
Informational (most operations) |
debug |
Debug information |
Best Practices#
- Review logs after major applies
- Keep retention long enough for audits
- Enable debug mode when troubleshooting
- Check partial failures for root cause
- Monitor log size on busy sites