smartapps-fr/yii-monolog

Monolog Yii Extension

dev-master 2015-10-13 10:46 UTC

This package is auto-updated.

Last update: 2024-03-25 06:17:33 UTC


README

Monolog for Yii 1.*

Inspired by baibaratsky/yii-rollbar.

Install

  • Add the Component to the preload list
'preload' => array(
	'monolog'
),
  • Configure the Component
'monolog' => array(
	'class' => 'application.vendor.smartapps-fr.yii-monolog.MonologComponent',
	'environment' => 'production',
	'syslog_identity' => 'SmartPublisher_Errors',
	//'stream_handler_filepath' => '/var/log/application.log',
	'use_json_formatter' => TRUE
),
  • Add LogRoute
'monolog' => array(
	'class' => 'application.vendor.smartapps-fr.yii-monolog.MonologLogRoute',
	'levels' => 'error, warning',
	'except' => array('exception.CHttpException.*')
),
  • Add Exception handler
'errorHandler' => array(
	'class' => 'application.vendor.smartapps-fr.yii-monolog.MonologErrorHandler',
),