phppro/log

PHPPRO Log

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.3.2 2017-03-14 12:43 UTC

This package is not auto-updated.

Last update: 2020-02-07 16:20:52 UTC


README

Installation:

Add phppro/log to your composer.json:

{
    "require": {
        "phppro/log": "dev-master"
    }
}

Now download the bundle by running the command:

$ php composer.phar update phppro/log

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Phppro\Bundle\LogBundle\PhpproLogBundle(),
    );
}

Usage:

It allows you to configure extra fields to add to each log records.

# config.yml
phppro_log:
    enabled: true
    handler: main
    fields:
        app: foo
        he:  llo

# config_dev.yml
monolog:
    handlers:
        main:
            type: socket
            connection_string: udp://127.0.0.1:5565
            formatter: phppro_log_formatter
            level: debug