PHPackages                             hydrakit/log - 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. hydrakit/log

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

hydrakit/log
============

Logging library for Hydra PHP framework

v0.2.0(yesterday)014—0%1MITPHP &gt;=8.2

Since Jul 2Compare

[ Source](https://github.com/hydra-foundation/log)[ Packagist](https://packagist.org/packages/hydrakit/log)[ RSS](/packages/hydrakit-log/feed)WikiDiscussions Synced today

READMEChangelogDependencies (2)Versions (4)Used By (1)

Hydra Log
=========

[](#hydra-log)

A minimal PSR-3 logger that writes one plain-text line per record to a writable stream. No handlers, no processors, no formatters config — Hydra's logging is a single deliberate class, the data-layer-style "ship the verb" of logging.

How it works
------------

[](#how-it-works)

`StreamLogger` is constructed with an already-open, writable stream — a file handle, `php://stderr`, `php://memory` in tests. **Sink selection is the caller's concern**: the class only formats and writes. The app's service provider is what opens `LOG_PATH` (falling back to stderr when the path is unwritable) and hands the stream in.

```
use Hydra\Log\StreamLogger;

$logger = new StreamLogger(fopen('php://stderr', 'w'));
$logger->info('request handled', ['method' => 'GET', 'status' => 200]);
// [2026-06-20T01:44:06+00:00] INFO: request handled {"method":"GET","status":200}
```

Each record renders as `[ISO-8601] LEVEL: message `:

- **Placeholders** — `{key}` tokens are interpolated from context per PSR-3. Substitution is keyed on value *type*, not truthiness, so `0`, `''` and `false` render rather than vanish. A placeholder with no usable value is left intact.
- **Leftover context** is appended as JSON. A `Throwable` under the conventional `exception` key is rendered as a readable class/message/file/line + trace instead.

Failures never escalate
-----------------------

[](#failures-never-escalate)

A broken sink (closed stream, full disk) must not take the application down with it: the write is `@fwrite` and guarded by `is_resource`. Logging is best-effort by design.

What it deliberately is not
---------------------------

[](#what-it-deliberately-is-not)

No log rotation, no level filtering, no multiple sinks. Those are the app's job if it ever needs them — bind a different `Psr\Log\LoggerInterface` implementation (Monolog, a fan-out logger) in the service provider and every consumer follows, because consumers depend on the PSR-3 interface, never on this class.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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 ~4 days

Total

3

Last Release

1d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hydrakit-log/health.svg)

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

###  Alternatives

[sentry/sentry

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

1.9k247.1M341](/packages/sentry-sentry)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M630](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M221](/packages/api-platform-metadata)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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