PHPackages                             wp-spaghetti/wonolog-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wp-spaghetti/wonolog-handler

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

wp-spaghetti/wonolog-handler
============================

Monolog handler that forwards Laravel logs to Inpsyde's Wonolog - works with any Laravel + WordPress setup: Acorn (w/wo Sage), WP Starter, Corcel, or custom integrations

v0.1.2(1mo ago)010GPL-3.0-or-laterPHPPHP &gt;=8.2CI passing

Since Dec 29Pushed 1mo agoCompare

[ Source](https://github.com/wp-spaghetti/wonolog-handler)[ Packagist](https://packagist.org/packages/wp-spaghetti/wonolog-handler)[ Docs](https://github.com/wp-spaghetti/wonolog-handler)[ Fund](https://buymeacoff.ee/frugan)[ RSS](/packages/wp-spaghetti-wonolog-handler/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (4)Used By (0)

[![PHP Version](https://camo.githubusercontent.com/c45c74feedb21bfe6a2f7f42d24d7dd4c050fe3b2c08ada8da4051cac98197dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/c45c74feedb21bfe6a2f7f42d24d7dd4c050fe3b2c08ada8da4051cac98197dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)[![Packagist Downloads](https://camo.githubusercontent.com/64c9dab8a4a75c26157421991f5297e5fbd0d14992d0aecebeb77d1a60814dd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/64c9dab8a4a75c26157421991f5297e5fbd0d14992d0aecebeb77d1a60814dd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)[![Packagist Stars](https://camo.githubusercontent.com/8568e074cbeb2ff7cbad9122ae22197b4a2811d8d4e1152f43ef84463b76de09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/8568e074cbeb2ff7cbad9122ae22197b4a2811d8d4e1152f43ef84463b76de09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)[![GitHub Actions Workflow Status](https://github.com/wp-spaghetti/wonolog-handler/actions/workflows/release.yml/badge.svg)](https://github.com/wp-spaghetti/wonolog-handler/actions/workflows/release.yml/badge.svg)[![Coverage Status](https://camo.githubusercontent.com/2b75737b7d4c3f43994f716b2119bf3a417948a537c1a33c39abe18cacdc91a3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/2b75737b7d4c3f43994f716b2119bf3a417948a537c1a33c39abe18cacdc91a3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)[![Known Vulnerabilities](https://camo.githubusercontent.com/679ba369ae003132b3b40da9c422a18b12a49ffdac341f9b41d537b7485129b4/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f77702d7370616768657474692f776f6e6f6c6f672d68616e646c65722f62616467652e737667)](https://camo.githubusercontent.com/679ba369ae003132b3b40da9c422a18b12a49ffdac341f9b41d537b7485129b4/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f77702d7370616768657474692f776f6e6f6c6f672d68616e646c65722f62616467652e737667)[![GitHub Issues](https://camo.githubusercontent.com/3a7b80815e8a12672637c04e87864f97753b267650038f9519813d1c97f702aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/3a7b80815e8a12672637c04e87864f97753b267650038f9519813d1c97f702aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)[![GitHub Release](https://camo.githubusercontent.com/6abe8b1d3d58997fb3ef3a10e4ff4f7db71ca341e8d9cf4e1ec8b5515b656237/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/6abe8b1d3d58997fb3ef3a10e4ff4f7db71ca341e8d9cf4e1ec8b5515b656237/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)[![License](https://camo.githubusercontent.com/d5e21b7f0537854c40df0b2a0854bba6b36acc70dcb7e84e0e2a79c8d2bc11d0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)](https://camo.githubusercontent.com/d5e21b7f0537854c40df0b2a0854bba6b36acc70dcb7e84e0e2a79c8d2bc11d0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77702d7370616768657474692f776f6e6f6c6f672d68616e646c6572)

Wonolog Handler
===============

[](#wonolog-handler)

Monolog handler that forwards Laravel logs to [Inpsyde's Wonolog](https://github.com/inpsyde/Wonolog) - the professional WordPress logging solution.

Works with any Laravel + WordPress setup: [Acorn](https://github.com/roots/acorn) (w/wo [Sage](https://github.com/roots/sage)), [WP Starter](https://wpstarter.dev/), [Corcel](https://github.com/corcel/corcel), or custom integrations.

Features
--------

[](#features)

- **Clean Laravel Syntax** - Use `Log::error()`, `Log::info()`, etc. anywhere in your code
- **Graceful Degradation** - Works with or without Wonolog active
- **wpify/scoper Support** - Automatically detects scoped Wonolog namespace
- **Zero Configuration** - Works out of the box with sensible defaults
- **Flexible Propagation** - Control whether to stop at Wonolog or continue to other handlers

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- WordPress &gt;= 6.0
- Laravel Illuminate/Support ^10.0|^11.0|^12.0
- Monolog ^2.0|^3.0

**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
------------

[](#installation)

### 1. Install the handler package

[](#1-install-the-handler-package)

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

```
composer require wp-spaghetti/wonolog-handler
```

The package auto-registers via service provider discovery.

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

[](#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](https://github.com/wp-spaghetti/wonolog), that provides a complete logging solution with production-ready configuration.

See the [WP Spaghetti Wonolog documentation](https://github.com/wp-spaghetti/wonolog) for setup and configuration options.

### 3. Configure logging

[](#3-configure-logging)

Update your `config/logging.php`:

```
