opus-online/yii-loggly

Yii Loggly is a Log Writer that sends all log messages to a loggly account

Installs: 156

Dependents: 0

Watchers: 2

Forks: 1

Language: PHP

1.1.0 2014-03-11 14:45 UTC

README

This module is a log writer for Yii that will send all log messages to a Loggly input.

Requirements

  • php >= 5.2
  • php5-curl extension
  • Yii 1.1.13 (should work on prior versions but not tested)

Usage

Install using composer ( https://packagist.org/packages/opus-online/yii-loggly )

At the head of protected/config/main.php add:

Yii::setPathOfAlias('OpusOnline.Loggly', dirname(FILE) . '/../vendors/opus-online/yii-loggly');

In the components section add:

    'log' => array(
        'class' => 'CLogRouter',
        'routes' => array(
            array(
                'class'=> '\OpusOnline\Loggly\Route',
                'inputKey' => '<KEY>',
                'finishRequest' => true,
                'levels'=> 'error, warning, info',
                'tag' => 'staging,php'
            ),
        ),
    ),