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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mawebdk/loggerfactory

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

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 3w ago

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

28

—

LowBetter than 52% of packages

Maintenance42

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

460d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/176606063?v=4)[mawebdk](/maintainers/mawebdk)[@mawebdk](https://github.com/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)
```

###  Alternatives

[sentry/sentry

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

1.9k240.0M314](/packages/sentry-sentry)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.0M601](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M182](/packages/api-platform-metadata)[pagemachine/typo3-formlog

Form log for TYPO3

23233.9k7](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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