Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 883 Bytes

README.md

File metadata and controls

45 lines (34 loc) · 883 Bytes

yii-monolog

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',
),