PHPackages                             elephox/logging - 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. elephox/logging

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

elephox/logging
===============

Elephox Logging library.

v0.7.0(3y ago)01152MITPHPPHP ^8.1 &lt;8.3

Since Jan 18Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (46)Used By (2)

Elephox Logging Module
======================

[](#elephox-logging-module)

This module is used by [Elephox](https://github.com/elephox-dev/framework) to log information to one or more destinations (sinks).

Example
-------

[](#example)

```
use Elephox\Logging\StandardSink;
use Elephox\Logging\SingleSinkLogger;
use Elephox\Logging\Contract\Sink;
use Elephox\Logging\LogLevel;

// create a logger with only one sink, a sink which logs to STDOUT and STDERR
$logger = new SingleSinkLogger(new StandardSink());

$logger->info('Hello world!'); // Prints to STDOUT: Hello world!
$logger->warning('This is a warning!'); // Prints to STDERR: This is a warning!

// You can also log meta data:
$logger->info('Hello world!', ['foo' => 'bar']);

// You can implement your own sink:
class MySink implements Sink
{
    public function write(string $message, LogLevel $level, array $metaData): void
    {
        $this->myThirdPartyLoggingService->log($message, $level->value, $metaData);
    }
}

$mySinkLogger = new SingleSinkLogger(new MySink());
$mySinkLogger->alert("This is an alert!");
```

You can also wrap sinks in decorator sinks (classes implementing `SinkProxy`):

```
use Elephox\Logging\SimpleFormatColorSink;
use Elephox\Logging\EnhancedMessageSink;

$standardSink = new StandardSink();
$formattedSink = new SimpleFormatColorSink($standardSink);

$formattedSink->write(LogLevel::INFO, 'Hello world!', []);
// Prints a blue "Hello" and a green "world" to STDOUT

$enhancedSink = new EnhancedMessageSink($formattedSink);
$enhancedSink->write(LogLevel::INFO, 'Hello world!', []);
// Prints a blue "Hello" and a green "world" to STDOUT, with a timestamp and a log level
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~13 days

Recently: every ~84 days

Total

34

Last Release

1141d ago

PHP version history (2 changes)v0.3.5PHP ~8.1.0 || ~8.2.0

0.3.27PHP ^8.1 &lt;8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ea436f1f084470f9d75ca0fde95e2418ba03d560bc4e20e03171648c123fa80?d=identicon)[ricardoboss](/maintainers/ricardoboss)

---

Top Contributors

[![ricardoboss](https://avatars.githubusercontent.com/u/6266356?v=4)](https://github.com/ricardoboss "ricardoboss (71 commits)")

### Embed Badge

![Health badge](/badges/elephox-logging/health.svg)

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

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[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)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2222.9M248](/packages/open-telemetry-sdk)[open-telemetry/api

API for OpenTelemetry PHP.

1833.0M214](/packages/open-telemetry-api)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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