PHPackages                             geo6/mezzio-monolog - 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. geo6/mezzio-monolog

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

geo6/mezzio-monolog
===================

Mezzio Monolog ErrorHandler

v2.0.2(5y ago)35.1k2[1 PRs](https://github.com/geo6/mezzio-monolog/pulls)GPL-3.0-or-laterPHP

Since Aug 20Pushed 2y agoCompare

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

READMEChangelog (4)Dependencies (8)Versions (6)Used By (0)

Mezzio Monolog ErrorHandler
===========================

[](#mezzio-monolog-errorhandler)

[![Latest Stable Version](https://camo.githubusercontent.com/d1dbdf4c7cce1ad31d65b292f5c41a60a43320bd121824796dcdf57697c2ad90/68747470733a2f2f706f7365722e707567782e6f72672f67656f362f6d657a7a696f2d6d6f6e6f6c6f672f762f737461626c65)](https://packagist.org/packages/geo6/mezzio-monolog)[![Total Downloads](https://camo.githubusercontent.com/77c11587952c20914e26c51034620553c25c7fe52f45cd1d54d5c1dba0291f39/68747470733a2f2f706f7365722e707567782e6f72672f67656f362f6d657a7a696f2d6d6f6e6f6c6f672f646f776e6c6f616473)](https://packagist.org/packages/geo6/mezzio-monolog)[![Monthly Downloads](https://camo.githubusercontent.com/44a8a47802d7457df097535622485a6cd483358d8aee169a2a6a5fb172c52825/68747470733a2f2f706f7365722e707567782e6f72672f67656f362f6d657a7a696f2d6d6f6e6f6c6f672f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/geo6/mezzio-monolog)[![Software License](https://camo.githubusercontent.com/1d0502ff5784987cf1c11b96e4aea6635732d0bc4d904c83fc1af479d32b13c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d332e302d627269676874677265656e2e737667)](LICENSE)

This library enables [Monolog](https://github.com/Seldaek/monolog) as ErrorHandler in Mezzio.

Currently, there are 2 handlers supported (more will be added if needed):

- [`StreamHandler`](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php): Logs records into any PHP stream, use this for log files.
- [`SentryHandler`](https://github.com/geo6/mezzio-monolog/blob/master/src/Handler/SentryHandler.php): Logs records to [Sentry.io](https://sentry.io/) (requires `sentry/sdk` package).

Install
-------

[](#install)

```
composer require geo6/mezzio-monolog
```

Configuration
-------------

[](#configuration)

Create a `monolog.global.php` file in your `config` directory:

```
