smartapps-fr/yii-monolog

Monolog Yii Extension

Installs: 231

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/smartapps-fr/yii-monolog

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

This package is auto-updated.

Last update: 2025-09-25 09:46:47 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',
),