Skip to content

smartapps-fr/yii-monolog

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages