Free & Open Source – WORDPRESS PLUGIN
WP Logs
Lightweight logging for WordPress.
Store custom messages, track HTTP requests, debug with confidence.
GPL-3.0 · WordPress 5.0+ · PHP 7.4+ · Tested up to 6.8.1
Visibility Into What Your Site Is Doing
WP Logs gives your WordPress site a dedicated logging system. Store custom log messages from any plugin or theme, selectively monitor outgoing HTTP requests, and browse everything from a clean admin page. No bloat, no complexity — just logs that work.
📝
Custom Log Messages
Fire a single do_action from anywhere in your code to store a log entry. Supports named sources, dynamic message placeholders, and context arrays for structured data.
🌐
HTTP Request Tracking
Selectively monitor outgoing API calls and external service interactions. Use the swpl_log_request filter to define exactly which URLs to track — payment gateways, APIs, webhooks, anything.
📊
Admin Log Viewer
Browse all logs from a dedicated page at WP Admin → Logs. Sort, filter, and search to find exactly what you need. No SSH, no file tailing — just a clean, searchable log interface.
Dead Simple API
Two hooks. That’s the entire integration surface. If you can write a do_action or add_filter, you can use WP Logs.
Log a Custom Message
Call from anywhere — your plugin, theme, or mu-plugin.
do_action(
'swpl_log',
'My Plugin', // Source name
'{{user}} performed {{action}}', // Message with placeholders
[ // Context data
'user' => 'John Doe',
'action' => 'profile update',
]
);
The source identifies where the log came from (your plugin name, theme, etc.). The message supports {{placeholder}} syntax that gets replaced with values from the context array. Context data is stored alongside the message for later reference.
Track HTTP Requests
Selectively enable logging for specific external URLs.
add_filter( 'swpl_log_request', function ( $enabled, $url ) {
$target_urls = [
'https://api.payment-gateway.com',
'https://external-service.com/api',
get_option( 'your_api_endpoint' ),
];
foreach ( $target_urls as $target_url ) {
if ( 0 === strpos( $url, $target_url ) ) {
return true;
}
}
return $enabled;
}, 10, 2 );
The filter receives every outgoing WordPress HTTP request URL. Return true for the URLs you want to log. Everything else is ignored. This keeps your log clean and focused on what matters — payment gateway calls, API integrations, webhook deliveries, etc.
Why WP Logs?
WordPress doesn’t ship with a structured logging system. WP Logs fills that gap without the overhead.
Lightweight by Design
No admin settings pages to configure, no external services to connect, no dashboards to learn. Just a logging API and a log viewer. Does one thing well.
Database-Backed Storage
Logs are stored in a dedicated custom table — not in flat files, not in wp_options, not in the error log. Structured, queryable, and performant. Easy to search and filter from the admin.
Selective HTTP Logging
Don’t log everything — that’s noise. WP Logs lets you target specific URLs so you only capture the HTTP requests that matter. Monitor payment APIs, check webhook delivery, debug third-party integrations.
Works With Everything
Uses WordPress-native hooks (do_action and add_filter). Integrates with any plugin, theme, or custom code. No SDK, no library dependencies, no vendor lock-in.
What Can You Log?
Anything that happens in your WordPress site. Here are the most common use cases.
Plugin Debugging
Log key events in your plugin lifecycle — activation, data processing, cron jobs, settings changes. Find bugs faster without adding temporary error_log() calls.
Payment Gateway Monitoring
Track every outgoing request to Stripe, PayPal, or your payment processor. See request payloads and responses. Diagnose failed transactions without guessing.
API Integration Debugging
Monitor calls to external APIs — CRMs, email services, property management platforms, social media endpoints. See exactly what’s being sent and received.
User Activity Tracking
Log user actions like profile updates, role changes, login events, or content edits. Build an audit trail for compliance or support diagnostics.
Webhook Verification
Confirm that outgoing webhooks are being delivered correctly. Log the URL, payload, and response for each webhook call. Stop wondering “did it fire?” — know for sure.
Cron Job Monitoring
Add log entries at the start and end of scheduled tasks. Verify that WP-Cron jobs are running on time, completing successfully, and processing the expected data.
Who Is This For?
Plugin & Theme Developers
Add structured logging to your plugins during development. Ship with logging hooks built-in so users can debug issues without touching code.
Site Administrators
Monitor critical operations — API integrations, payment processing, form submissions. Get visibility without SSH access or server-side log files.
Support Teams
Diagnose user-reported issues by reviewing the log trail. See exactly what happened, when, and in what order — without asking the user to reproduce the issue.
Security-Conscious Teams
Track suspicious activities, unexpected API calls, and unauthorized access attempts. Build a lightweight audit trail that lives right inside WordPress.
Under the Hood
Storage: Dedicated custom database table
API: WordPress hooks (do_action, add_filter)
Admin UI: WP Admin → Logs
License: GPL-3.0
Requires: WordPress 5.0+ · PHP 7.4+
Tested up to: WordPress 6.8.1
Latest version: 2.0.8
Total releases: 22
Start Logging in 2 Minutes
Download the zip, activate the plugin, and fire your first do_action( 'swpl_log', ... ). That’s it.
Free & open source · GPL-3.0 · No account required · 22 releases and counting
