Skip to content

Conversation

@colinmurphy
Copy link
Member

@colinmurphy colinmurphy commented Sep 4, 2025

Description

Fixes #354
Fixes #390

This pull request introduces a new admin interface for viewing, filtering, and downloading WPGraphQL logs, alongside several configuration and dependency updates. The most significant changes are the addition of log viewing and download functionality, improvements to log filtering, and updates to plugin dependencies and configuration.

New Admin Log Viewing & Download Functionality:

  • Added the View_Logs_Page class, which registers a new admin page for viewing logs, supports filtering, and enables log downloads in CSV format. (src/Admin/View_Logs_Page.php)
  • Introduced Download_Log_Service to handle CSV generation and download for individual log entries, using the new league/csv dependency. (src/Admin/View/Download/Download_Log_Service.php)

Log Filtering & List Display:

  • Added templates for displaying logs (wpgraphql-logger-list.php) and for filtering logs by date and level (wpgraphql-logger-filters.php). (src/Admin/View/Templates/wpgraphql-logger-list.php, src/Admin/View/Templates/wpgraphql-logger-filters.php) [1] [2]
  • Added a template for viewing individual log details with a download button. (src/Admin/View/Templates/wpgraphql-logger-view.php)

Configuration & Dependency Updates:

  • Updated composer.json to require PHP >=8.1.2 and added league/csv as a dependency. Adjusted platform PHP version and simplified Psalm script commands. (composer.json) [1] [2] [3]
  • Added Psalm suppressions for specific files and issues to the static analysis configuration. (psalm.xml)

Settings & UI Adjustments:

  • Removed unused fields (WPGRAPHQL_FILTERING and PERFORMANCE_METRICS) from the basic configuration tab and reordered data sampling options for clarity. Updated event logging help text to reflect new defaults. (src/Admin/Settings/Fields/Tab/Basic_Configuration_Tab.php) [1] [2] [3]
  • Updated the admin settings template to remove references to performance threshold and add a "View Logs" button for easier navigation. (src/Admin/Settings/Templates/admin.php) [1] [2]

Related Issue

Dependant PRs

Type of Change

  • ✅ Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactoring (no functional changes)
  • 📄 Example update (no functional changes)
  • 📝 Documentation update
  • 🔍 Performance improvement
  • 🧪 Test update

How Has This Been Tested?

Screenshots

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's coding standards
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • Any dependent changes have been highlighted, merged or published

colinmurphy and others added 9 commits September 2, 2025 18:56
Replaces the grid view with a paginated logs list table in the admin area using WP_List_Table. Introduces List_Table and LogsRepository classes for log retrieval and display, updates View_Logs_Page to use the new list view, and refactors DatabaseEntity for improved log querying and instantiation.
@changeset-bot
Copy link

changeset-bot bot commented Sep 4, 2025

🦋 Changeset detected

Latest commit: f477781

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wpengine/wpgraphql-logging-wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link

github-actions bot commented Sep 4, 2025

ℹ️ Download the latest wpgraphql-logging plugin zip from this PR
(See the 'Artifacts' section at the bottom)

@colinmurphy colinmurphy changed the title chore: DRAFT Logging plugin admin view chore: Logging plugin admin view Sep 5, 2025
@colinmurphy colinmurphy marked this pull request as ready for review September 5, 2025 17:31
@colinmurphy colinmurphy requested a review from a team as a code owner September 5, 2025 17:31
@colinmurphy colinmurphy added this pull request to the merge queue Sep 12, 2025
Merged via the queue into main with commit 9773108 Sep 12, 2025
6 of 19 checks passed
@colinmurphy colinmurphy deleted the logging-plugin-admin-view branch September 12, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Logging admin - integrate a few missing settings WPGraphQL Logging - Add admin view and functionality

4 participants