📊
System

Activity Logs

Admin Settings

Comprehensive audit trail for all user actions

Overview

Full audit logging system tracking user actions, system events, and data changes. Records IP addresses, user agents, and before/after values. Essential for compliance and debugging.

Design Considerations

UX patterns and visual design notes for this feature:

  • Timeline view makes logs scannable
  • Color-code action types (create=green, delete=red)
  • Expandable rows for detailed diff views
  • Filters are essential for large datasets

Key Benefits

What makes this feature stand out:

  • Complete audit trail
  • IP and user agent tracking
  • Before/after value comparison
  • Configurable retention period
Technical Note

ActivityLog::log() for generic logging. ActivityLogHelper has shortcuts like logLogin(), logLogout(). Old values and new values stored as JSON.

Helpers
ActivityLogHelper
Models
ActivityLog
Database Tables
activity_log

Configuration

Config Relationship Legend
DB overrides params.php🔗 DB related setting📋 DB stores value only
params.php Configuration

Config path: params['activityLog']

params['activityLog']['enabled'] => trueparams['activityLog']['logActions'] => ['login', 'logout', 'create', 'update', 'delete']params['activityLog']['excludeRoutes'] => ['site/captcha']
Database Settings (system_setting table)
KeyTypeDescriptionRelation
activity_log_retention_daysnumberDays to retain logs before cleanup📋
activity_log_anonymous_visitsbooleanLog anonymous visitor page views📋