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

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

themosis/log
============

The Themosis log component.

14PHP

Since Feb 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/themosis/log)[ Packagist](https://packagist.org/packages/themosis/log)[ RSS](/packages/themosis-log/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Themosis Log
============

[](#themosis-log)

The Themosis log component is a lightweight logging library for PHP.

The component is only promoting the PSR-3 interface and provides a simple repository interface and concrete in-memory implementation to manage PSR-3 compatible loggers.

By default, the library is not installing any logger implementation but is suggesting the usage of the popular [Monolog](https://seldaek.github.io/monolog/) package.

Feel free to install any PSR-3 compatible logger alongside the library.

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

[](#installation)

> Examples below are leveraging the usage of the [Monolog](https://seldaek.github.io/monolog/) library.

Install the package using [Composer](https://getcomposer.org/) and add you preferred logging library implementation:

```
composer require themosis/log monolog/monolog
```

The above code is going to install the `themosis/log` package as well as the `monolog/monolog` one.

Usage
-----

[](#usage)

### Register a logger

[](#register-a-logger)

You can register a logger using the in-memory repository. Each **logger** must have a unique channel name.

```
use Themosis\Components\Log\Channel;
use Themosis\Components\Log\InMemoryLoggers;

// Create a logger instance using any PSR-3 library
$channel = new Channel('APP');
$logger = new Monolog\Logger($channel);

// Register the logger in the registry
$loggers = new InMemoryLoggers();
$loggers->add($channel, $logger);
```

The channel class provided a unique identifier for the associated logger.

> A logger can not be overwritten in the repository and will throw a `LoggerAlreadyExists` exception if you try to do so.

### Retrieve a logger

[](#retrieve-a-logger)

You can get back a registered logger by passing the channel identifier like so:

```
$applicationLogger = $loggers->get(new Channel('APP'));

// Log something using the PSR-3 retrieved logger...
$applicationLogger->info('An applicaton event just occured...');
```

> The repository will throw a `LoggerNotFound` exception if the logger is not registered and you're trying to retrieve it.

If you intend to always expect a logger to be returned from the repository even if not registered, you can simply create your own repository by using the `Themosis\Components\Log\Loggers` interface.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f50d43fa42a64e828395bf8aff851be14c2278cfb6b364ba64880c45afa9c09?d=identicon)[jlambe](/maintainers/jlambe)

---

Top Contributors

[![jlambe](https://avatars.githubusercontent.com/u/1917490?v=4)](https://github.com/jlambe "jlambe (9 commits)")

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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