PHPackages                             alleyinteractive/logger - 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. alleyinteractive/logger

ActiveWordpress-plugin[Logging &amp; Monitoring](/categories/logging)

alleyinteractive/logger
=======================

A Monolog-based logging tool for WordPress. Supports storing log message in a custom post type or in individual posts and terms.

v2.6.4(3mo ago)30297.5k—3.3%3[8 issues](https://github.com/alleyinteractive/logger/issues)1GPL-2.0-or-laterPHPPHP ^8.2CI passing

Since May 15Pushed 3mo ago47 watchersCompare

[ Source](https://github.com/alleyinteractive/logger)[ Packagist](https://packagist.org/packages/alleyinteractive/logger)[ Docs](https://github.com/alleyinteractive/logger)[ RSS](/packages/alleyinteractive-logger/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (34)Used By (1)

Logger
======

[](#logger)

[![All Pull Request Tests](https://github.com/alleyinteractive/logger/actions/workflows/all-pr-tests.yml/badge.svg?branch=develop)](https://github.com/alleyinteractive/logger/actions/workflows/all-pr-tests.yml)

Providing a WordPress integration with Monolog, allowing site-wide and post and term specific logging.

[![Screenshot of Example Log](https://user-images.githubusercontent.com/346399/81981285-197bd880-95fe-11ea-8645-1bb0fa3569a8.png)](https://user-images.githubusercontent.com/346399/81981285-197bd880-95fe-11ea-8645-1bb0fa3569a8.png)

Documentation
-------------

[](#documentation)

See the [wiki](https://github.com/alleyinteractive/logger/wiki) for complete information and more examples.

Installation
------------

[](#installation)

Logger requires PHP 8.2 and Composer to run properly.

```
composer require alleyinteractive/logger
```

You can also install the plugin as a submodule by using the `*-built` tag of a release.

Usage
-----

[](#usage)

AI Logger is a complete interface to Monolog with some nice WordPress handlers built in.

```
// Log site-wide to the ai_log post type.
ai_logger()->info( 'Log message...' );

\AI_Logger\AI_Logger::info( 'Another format for logging.' );
```

### Logging to a Specific Post

[](#logging-to-a-specific-post)

Logs will be appended to a post's meta for review.

```
ai_logger_to_post( $post_id, 'meta-key' )->info( 'This will log to the  for a specific post.' );
```

### Logging to a Specific Term

[](#logging-to-a-specific-term)

Logs will be appended to a term's meta for review.

```
ai_logger_to_term( $term_id, 'meta-key' )->info( 'This will log to the  for a specific term.' );
```

### Logging to Query Monitor

[](#logging-to-query-monitor)

```
ai_logger_to_qm()->info( 'This will show up in Query Monitor!' );
```

### Logging with Default Context

[](#logging-with-default-context)

```
ai_logger()->with_context( 'example-context' )->info( 'This will log to the example-context.' );
```

Also supports an array of default log context:

```
ai_logger()->with_context(
	[
		'context' => 'example-context',
		'key'     => 'value',
	]
)->info( 'This will log to the example-context with key=>value.' );
```

You can also pass the context to `ai_logger()` directly:

```
ai_logger( 'example-context' )->info( 'This will log to the example-context.' );
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Maintainers
-----------

[](#maintainers)

This project is actively maintained by [Alley Interactive](https://github.com/alleyinteractive). Like what you see? [Come work with us](https://alley.com/careers/).

[![Alley logo](https://avatars.githubusercontent.com/u/1733454?s=200&v=4)](https://avatars.githubusercontent.com/u/1733454?s=200&v=4)

License
-------

[](#license)

This software is released under the terms of the GNU General Public License version 2 or any later version.

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance76

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 74.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~80 days

Recently: every ~74 days

Total

27

Last Release

96d ago

PHP version history (6 changes)v2.1-beta2PHP ^7.4

v2.1.1PHP ^7.4|^8.0

v2.1.2PHP ^7.4 || ^8.0

v2.3.0PHP ^8.0

v2.4.1PHP ^8.1

v2.6.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/338d27065b1074f2d66d049d742f22996dd137eef6f91bc8f75350ceee1e8ef2?d=identicon)[srtfisher](/maintainers/srtfisher)

![](https://www.gravatar.com/avatar/d2679da8ee30c4d7eae16ffd2271484027b3b27be6d7fb8202d5e4c6d210881d?d=identicon)[alleyinteractive](/maintainers/alleyinteractive)

---

Top Contributors

[![srtfisher](https://avatars.githubusercontent.com/u/346399?v=4)](https://github.com/srtfisher "srtfisher (294 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (37 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (20 commits)")[![vancoder](https://avatars.githubusercontent.com/u/1987246?v=4)](https://github.com/vancoder "vancoder (15 commits)")[![jaredcobb](https://avatars.githubusercontent.com/u/329077?v=4)](https://github.com/jaredcobb "jaredcobb (10 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (7 commits)")[![emilyatmobtown](https://avatars.githubusercontent.com/u/24902269?v=4)](https://github.com/emilyatmobtown "emilyatmobtown (5 commits)")[![scottnelle](https://avatars.githubusercontent.com/u/2235527?v=4)](https://github.com/scottnelle "scottnelle (4 commits)")[![attackant](https://avatars.githubusercontent.com/u/4309872?v=4)](https://github.com/attackant "attackant (2 commits)")[![anubisthejackle](https://avatars.githubusercontent.com/u/1724534?v=4)](https://github.com/anubisthejackle "anubisthejackle (2 commits)")[![eduwass](https://avatars.githubusercontent.com/u/1070495?v=4)](https://github.com/eduwass "eduwass (1 commits)")

---

Tags

loggerloggingmonologwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/alleyinteractive-logger/health.svg)

```
[![Health](https://phpackages.com/badges/alleyinteractive-logger/health.svg)](https://phpackages.com/packages/alleyinteractive-logger)
```

###  Alternatives

[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8674.9k](/packages/illuminated-console-logger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
