Description
The plugin sends structured WordPress and WooCommerce log events to a Seq server using the CLEF ingestion format.
Arbyte Structured Logging for Seq is an independent WordPress plugin and is not affiliated with, endorsed by, or sponsored by Datalust or the Seq project. Seq is a product of Datalust.
Features:
- Sends WordPress PHP errors, uncaught exceptions, and fatal errors to Seq.
- Integrates with WooCommerce’s log handler system when WooCommerce is active.
- Buffers events and sends them in batches of up to 100 events.
- Retries transient HTTP failures.
- Redacts sensitive context fields such as passwords, tokens, API keys, and credentials.
- Supports configurable minimum log levels.
- Provides an admin connection test.
- Supports configuration through the WordPress settings page or
wp-config.phpconstants.
The plugin installs an early bootstrap during activation so fatal errors that occur before normal plugin loading can also be reported. Events may contain exception messages, stack traces, file paths, site names, and site URLs. Configure the destination and retention policy in accordance with your privacy requirements.
Requirements
- WordPress 6.5 or later
- PHP 8.1 or later
- A Seq server with CLEF ingestion enabled
- WooCommerce is optional; WooCommerce logs are forwarded automatically when it is active.
Configuration
The settings page supports the following options:
- Seq base URL
- Optional API key
- Minimum logging level:
debug,info,notice,warning,error,critical,alert, oremergency
For deployment configuration, define these constants in wp-config.php:
`php
define(‘WP_SEQ_URL’, ‘https://seq.example.com’);
define(‘WP_SEQ_API_KEY’, ‘your-api-key’);
define(‘WP_SEQ_MIN_LEVEL’, ‘warning’);
`
Constants override the corresponding settings-page values. Fields overridden by constants are disabled in the settings page.
Installation
- Upload the
structured-logging-for-seqdirectory to/wp-content/plugins/or install the plugin through the WordPress admin area. - Activate the plugin through the Plugins screen.
- Go to Settings > Seq.
- Enter the Seq base URL, for example
https://seq.example.com. - Optionally enter a Seq API key.
- Select the minimum logging level and save the settings.
- Use Test connection to verify the configuration.
The CLEF ingestion endpoint is <seq-url>/ingest/clef.
FAQ
-
Where are events sent?
-
Events are sent to the
/ingest/clefendpoint below the configured Seq base URL. -
Does the plugin require WooCommerce?
-
No. WooCommerce support is optional and is enabled automatically when WooCommerce is active.
-
Normal delivery retries transient transport failures and HTTP 429 and 5xx responses. Events are held only in the current request and are not persisted locally.
-
How do I configure a different log level per environment?
-
Set
WP_SEQ_MIN_LEVELinwp-config.php, or configure the value on the settings page. By default, production useswarning, staging usesinfo, and development and local environments usedebug.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Arbyte Structured Logging for Seq” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Arbyte Structured Logging for Seq” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release.
- Added batched CLEF delivery to Seq.
- Added WordPress and WooCommerce logging integration.
- Added settings-page and
wp-config.phpconfiguration. - Added configurable log levels, retries, redaction, and early bootstrap logging.