PHPackages                             slaxweb/logger - 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. slaxweb/logger

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

slaxweb/logger
==============

Logger component for SlaxWeb Framework

0.5.0(9y ago)01.3k8MITPHPPHP &gt;=7.0.0

Since Mar 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/SlaxWeb/Logger)[ Packagist](https://packagist.org/packages/slaxweb/logger)[ RSS](/packages/slaxweb-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (8)

Logger
======

[](#logger)

The SlaxWeb\\Logger component is only a simple wrapper around the Seldaek/monolog library to provide an easier integration into the SlaxWeb\\Framework. It provides only a Service Provider for the Pimple Dependency Injection Container, and a Factory for instantiation of the logger library. The Logger component also depends on the Config component of the SlaxWeb\\Framework.

Installation
============

[](#installation)

Easiest method of installation is through composer, to install just edit your composer.json file to contain:

```
{
    "require": {
        "slaxweb/logger": "~0.2"
    }
}
```

Usage
=====

[](#usage)

To instantiate the logger through the Factory you first need to instantiate the Config component, as the Factory will require it to successfully instantiate the logger. The Config component has to provide the following three configuration items:

- logger.name - Used by Monolog as the name of the logger
- logger.loggerType - Used to determine which Monolog Logger Handler to use for the logger, value needs to match the name of the Handler class, currently only StreamHandler is supported
- logger.handlerArgs.&lt;logger.loggerType&gt; - Argument list that are going to be passed to the Handler instantiation

When all of the above is set, you may safely call the **Factory::init** method, and you will retrieve an instance of the logger in return.

```
$logger = \SlaxWeb\Logger\Factory::init($config);
```

If you wish to use the Service Provider, then you need to make sure that the Config components Service Provider is registered prior to trying to accessing the logger definition. Of course, the above configuration items are required as well. All that remains to do is to register the Service Provider of the logger, and it will define the logger instantiation to the **logger.service** key name.

```
$container->register(new \SlaxWeb\Logger\Service\Provider);
$container["logger.service"]->addInfo("Logger loaded");
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

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

Every ~98 days

Total

5

Last Release

3316d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fbb351446cdd2b932bab3799f6a317e33044a33b4748b91c7aaaf433abdeb3d?d=identicon)[slax0r](/maintainers/slax0r)

---

Top Contributors

[![slax0rr](https://avatars.githubusercontent.com/u/3025605?v=4)](https://github.com/slax0rr "slax0rr (60 commits)")

### Embed Badge

![Health badge](/badges/slaxweb-logger/health.svg)

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

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k189.7M258](/packages/symfony-monolog-bridge)[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)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

2382.6k](/packages/graycore-magento2-stdlogging)

PHPackages © 2026

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