Download the PHP package wp-spaghetti/wonolog-handler without Composer

On this page you can find all versions of the php package wp-spaghetti/wonolog-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wonolog-handler

PHP Version Packagist Downloads Packagist Stars GitHub Actions Workflow Status Coverage Status Known Vulnerabilities GitHub Issues GitHub Release License

Wonolog Handler

Monolog handler that forwards Laravel logs to Inpsyde's Wonolog - the professional WordPress logging solution.

Works with any Laravel + WordPress setup: Acorn (w/wo Sage), WP Starter, Corcel, or custom integrations.

Features

Requirements

Note: Inpsyde's Wonolog is not required for the package to work. Without Wonolog, logs gracefully pass through to other handlers in your stack (e.g., file logging).

Installation

1. Install the handler package

In your Laravel + WordPress project (Sage theme, WP Starter, etc.):

The package auto-registers via service provider discovery.

2. Install WP Spaghetti Wonolog mu-plugin (optional)

For email notifications, sensitive data filtering, and advanced logging features, install the WP Spaghetti Wonolog mu-plugin, that provides a complete logging solution with production-ready configuration.

See the WP Spaghetti Wonolog documentation for setup and configuration options.

3. Configure logging

Update your config/logging.php:

See examples/logging.php for a complete configuration example.

Usage

Basic Logging

With Context

Channel Selection

Framework-Specific Examples

Sage Themes (Acorn)

WP Starter

Corcel

See examples/usage.php for more real-world examples including WordPress hooks, WooCommerce integration, API logging, and performance monitoring.

Advanced Configuration

Publish Configuration

To customize settings, publish the config:

This creates config/wonolog.php in your project:

Custom Wonolog Namespace (for wpify/scoper)

If Wonolog is scoped, override the namespace:

Via config:

Via filter:

Via environment:

Custom Action Hook (for wpify/scoper)

If Wonolog uses a custom action hook name:

Via config:

Via filter:

Via environment:

Control Log Propagation

By default, logs continue to other handlers in the stack after Wonolog (allowing file backup). You can change this:

Stop at Wonolog (no file backup):

Or via environment:

Use cases:

How It Works

Architecture

Technical Details

Channel Handling:

Example behavior:

PSR-3 Placeholder Compatibility:

Extra Data:

Graceful Degradation

Without Wonolog mu-plugin:

With Wonolog mu-plugin:

Namespace Detection

The handler automatically detects Wonolog's namespace:

  1. Checks default Inpsyde\Wonolog
  2. Applies filter wonolog_handler_namespace
  3. Supports scoped namespaces from wpify/scoper
  4. Verifies Configurator::ACTION_SETUP was triggered
  5. Caches result for performance

Troubleshooting

Logs not appearing in Wonolog

Check if Wonolog is active:

Wrong namespace or action detected

Override via filter or config (see Advanced Configuration).

Channel-related issues

Understanding channel behavior:

  1. Custom Wonolog channel (when explicitly provided):

  2. Default Wonolog channel (when not provided):

  3. Channel extraction:

    • If 'channel' is in context, it's extracted and passed to Wonolog at top level
    • The 'channel' key is removed from context to avoid duplication
    • This ensures channel appears only once in emails (as "Channel: XXX", not in context)
  4. Monolog vs Wonolog channels:

    • Monolog channels (development, stack, single) route logs in Laravel
    • Wonolog channels (DEBUG, SECURITY, HTTP) categorize logs in Wonolog
    • They are completely separate - Monolog channels are NOT sent to Wonolog
    • To set a Wonolog channel: Log::error('msg', ['channel' => 'SECURITY'])
  5. Channel naming conventions ⚠️:

    • IMPORTANT: Wonolog uses UPPERCASE channel names by convention
    • Standard Wonolog channels: DEBUG, SECURITY, HTTP, DB, PHP-ERROR, CRON, etc.
    • Using lowercase (e.g., 'security' instead of 'SECURITY') may cause logs not to be tracked
    • Using non-configured channels (e.g., 'FOO') may also not be tracked
    • This behavior depends on your Wonolog configuration and filters
    • Best practice: Always use UPPERCASE for channel names
  6. Custom channel names:
    • You can use custom channel names if configured in Wonolog
    • Examples: PAYMENT, API, WOOCOMMERCE, etc.
    • Make sure they're configured in your Wonolog setup
    • Always use UPPERCASE for consistency

Logs not in file backup

Ensure 'single' channel is in the stack:

And ensure stop_propagation is false (default).

Testing

More info

See LINKS file.

Changelog

Please see CHANGELOG for a detailed list of changes for each release.

We follow Semantic Versioning and use Conventional Commits to automatically generate our changelog.

Release Process

All releases are automatically created when changes are pushed to the main branch, based on commit message conventions.

Contributing

For your contributions please use:

See CONTRIBUTING for detailed guidelines.

Sponsor

Buy Me A Coffee

License

(ɔ) Copyleft 2026 Frugan.
GNU GPLv3, see LICENSE file.


All versions of wonolog-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
monolog/monolog Version ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wp-spaghetti/wonolog-handler contains the following files

Loading the files please wait ...