PHPackages                             piotr-cz/monolog-piwik-handler - 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. piotr-cz/monolog-piwik-handler

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

piotr-cz/monolog-piwik-handler
==============================

Piwik Handler for Monolog

19PHP

Since Jan 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/piotr-cz/monolog-piwik-handler)[ Packagist](https://packagist.org/packages/piotr-cz/monolog-piwik-handler)[ RSS](/packages/piotr-cz-monolog-piwik-handler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Piwik Handler for Monolog
=========================

[](#piwik-handler-for-monolog)

Provides a handler for [Monolog](https://github.com/Seldaek/monolog) that sends records to piwik server.

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

[](#installation)

This library can be installed via composer: "piotr-cz/monolog-piwik-handler": "~1.0"

```
$ composer require piotr-cz/monolog-piwik-handler
```

Example use
-----------

[](#example-use)

Example setup using [Pimple](http://pimple.sensiolabs.org/) DI Container

```
// Add PiwikTracker to DIC
$container['PiwikTracker'] = function($c) {
    return new \PiwikTracker(
        // idSite
        1,
        // apiUrl
        'http://piwik.domain.tld/'
    );
}

// Add Logger to DIC
$container['logger'] = function($c) {
    $logger = new \Monolog\Logger('app']);

    $logger->pushHandler(
        new \PiotrCz\MonologPiwikHandler\PiwikHandler(
            // Piwik tracker instance
            $c['PiwikTracker'],
            // Optional category to log errors to.
            'Errors'
        )
    );
}
```

Then in your error handler

```
$logger->addError('500', ['exception' => $exception]);
```

Requirements
------------

[](#requirements)

- PHP 5.3+

License
-------

[](#license)

Released under the [MIT License](./LICENSE.md)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/04531027d1592929b57822d700d43ea8343edc1f2e0d5e298985491193eaa1fa?d=identicon)[piotr-cz](/maintainers/piotr-cz)

---

Top Contributors

[![piotr-cz](https://avatars.githubusercontent.com/u/612953?v=4)](https://github.com/piotr-cz "piotr-cz (3 commits)")

---

Tags

monolog-handlerphppiwik

### Embed Badge

![Health badge](/badges/piotr-cz-monolog-piwik-handler/health.svg)

```
[![Health](https://phpackages.com/badges/piotr-cz-monolog-piwik-handler/health.svg)](https://phpackages.com/packages/piotr-cz-monolog-piwik-handler)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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