Scope
Enhance the existing activity log system with an admin global log view and improved filtering:
- Per-faction activity log GUI already exists (
LogsViewerPage.java) with 17 event types, pagination (10/page), and type filtering
- NEW: Admin global activity log — shows events across ALL factions, accessible via
/f admin log
- NEW: Player filter — filter activity log entries by specific player (actor)
- NEW: Date range filter — filter by time period (last hour, day, week, custom)
- ENHANCE: Existing per-faction log — add player filter capability
Implementation Details
Existing activity log (LogsViewerPage.java):
- 17
FactionLog.LogType values: MEMBER_JOIN, MEMBER_LEAVE, MEMBER_KICK, MEMBER_PROMOTE, MEMBER_DEMOTE, CLAIM, UNCLAIM, OVERCLAIM, HOME_SET, RELATION_ALLY, RELATION_ENEMY, RELATION_NEUTRAL, LEADER_TRANSFER, SETTINGS_CHANGE, POWER_CHANGE, ECONOMY, ADMIN_POWER
- Pagination: 10 per page (line 31)
- Type filtering exists (lines 42-49)
- Sorting: newest first (line 71)
Admin global log implementation:
- Create
AdminActivityLogPage.java — iterates factionManager.getAllFactions(), collects all logs, merges + sorts by timestamp
- Add faction name/tag to each log entry display for context
- Register in admin GUI section of
FactionPageRegistry
- Command:
/f admin log [type] [player]
Player filter enhancement:
- Add player UUID filter to
LogsViewerPage data model
- Filter using
FactionLog.actorUuid() match
- UI: dropdown or search field for player selection
Risks and Alternatives
- Storage concern: Aggregating logs across all factions for the admin view could be expensive — consider lazy loading or time-window limits
- Retention: May need configurable log retention/pruning (e.g., keep last 30 days) to prevent unbounded growth
- Alternative: Text-only
/f admin log output without GUI for simpler implementation first
References and Media
Enhances the existing LogsViewerPage.java pattern. Global log follows the AdminEconomyPage.java pattern for admin-level aggregate views.
Scope
Enhance the existing activity log system with an admin global log view and improved filtering:
LogsViewerPage.java) with 17 event types, pagination (10/page), and type filtering/f admin logImplementation Details
Existing activity log (
LogsViewerPage.java):FactionLog.LogTypevalues: MEMBER_JOIN, MEMBER_LEAVE, MEMBER_KICK, MEMBER_PROMOTE, MEMBER_DEMOTE, CLAIM, UNCLAIM, OVERCLAIM, HOME_SET, RELATION_ALLY, RELATION_ENEMY, RELATION_NEUTRAL, LEADER_TRANSFER, SETTINGS_CHANGE, POWER_CHANGE, ECONOMY, ADMIN_POWERAdmin global log implementation:
AdminActivityLogPage.java— iteratesfactionManager.getAllFactions(), collects all logs, merges + sorts by timestampFactionPageRegistry/f admin log [type] [player]Player filter enhancement:
LogsViewerPagedata modelFactionLog.actorUuid()matchRisks and Alternatives
/f admin logoutput without GUI for simpler implementation firstReferences and Media
Enhances the existing
LogsViewerPage.javapattern. Global log follows theAdminEconomyPage.javapattern for admin-level aggregate views.