PHPackages                             mawebdk/loggerfactory - 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. mawebdk/loggerfactory

ActiveLibrary

mawebdk/loggerfactory
=====================

Simple LoggerFactory to support creation of PSR-3 logger objects without dependency injection.

1.0.0(1y ago)03BSD-2-ClausePHPPHP ^8.3.6

Since Mar 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mawebdk/loggerfactory)[ Packagist](https://packagist.org/packages/mawebdk/loggerfactory)[ RSS](/packages/mawebdk-loggerfactory/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

loggerfactory
=============

[](#loggerfactory)

Simple LoggerFactory to support easy creation of PSR-3 logger objects without the need of dependency injection in the constructor methods.

Usage
-----

[](#usage)

### LoggerProvider

[](#loggerprovider)

This package requires a user-implemented class implementing the LoggerProviderInterface, which has the method `public function getLogger(string $classname): LoggerInterface`. This class must return an instance of the PSR-3 LoggerInterface to handle all the logger request for the current object with the given classname.

The assumption is that the LoggerProvider uses some kind of configuration to ensure the returned PSR-3 logger object handles the logging according to the configuration.

Before perform any logging, the user-implemented logger provider must be set by calling `LoggerFactory::setLoggerProvider($loggerProvider);`.

### LoggerFactory

[](#loggerfactory-1)

Perform `$logger = LoggerFactory::getLogger($classname);` to obtain a PSR-3 logger object to handle the logging in an object with the classname $classname.

### LoggerFactoryTrait

[](#loggerfactorytrait)

To simplify the logic to obtain a PSR-3 logger object, include the trait LoggerFactoryTrait in the class, and perform `self::getLogger()->debug('Some debug message');` or similar for the other logging methods.

###  Health Score

30

—

LowBetter than 67% of packages

Maintenance50

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

366d ago

### Community

Maintainers

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

---

Top Contributors

[![mawebdk](https://avatars.githubusercontent.com/u/176606063?v=4)](https://github.com/mawebdk "mawebdk (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mawebdk-loggerfactory/health.svg)

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

PHPackages © 2026

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