PHPackages                             ebittleman/monolog-zf2 - 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. ebittleman/monolog-zf2

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

ebittleman/monolog-zf2
======================

Monolog wrapper for zf2

1.1.0(10y ago)161The MIT License (MIT)PHP

Since May 31Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

Monolog Zend Framework 2 Wrapper
================================

[](#monolog-zend-framework-2-wrapper)

[![Build Status](https://camo.githubusercontent.com/977d4e3645e85102a84f6b0bc6798875bbf8d750579bd86696510b8139f4936d/68747470733a2f2f7472617669732d63692e6f72672f65626974746c656d616e2f6d6f6e6f6c6f672d7a66322e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ebittleman/monolog-zf2) [![Packagist](https://camo.githubusercontent.com/4cab49667d17ae4a9d6b5501b484dcc8d2487b36bcacf1246b5c1258963e14d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65626974746c656d616e2f6d6f6e6f6c6f672d7a66322e737667)](https://packagist.org/packages/ebittleman/monolog-zf2)

This project is a basic wrapper for the Monolog logger check it out for all the bells and whistles [here](https://github.com/Seldaek/monolog).

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

[](#installation)

### Install the Package

[](#install-the-package)

```
composer require ebittleman/monolog-zf2

```

### Enable Zf2 Module

[](#enable-zf2-module)

Update your application config to include the module.

```
return array(
    'modules' => array(
        ...YOUR MODULES...,
        'MonologZf2'
    ),
    'module_listener_options' => array(
        'config_glob_paths' => array(
            ...YOUR CONFIG PATHS...
        ),
        'module_paths' => array(
            ...YOUR MODULES PATHS...
        )
    )
);

```

Config Example
--------------

[](#config-example)

The following configuration will make 2 different loggers available from the service manager where the service name is the array key. Each logger is configured with a list of handlers, each of which has a `handlerClass` and `args` that will be passed to the handler's constructor. This example can be found in /config/monolog.global.dist

```
