Yii 1.1: cmqlogroute

The 'CMQLogRoute' is a Yii Framework Plugin that avoids to write log-messages to MQ-exchange.
3 followers

CMQLogRoute Extension

The 'CMQLogRoute' is a Yii Framework Plugin that avoids to write log-messages to MQ-exchange.

Requirements

  • Yii 1.1.*
  • CAMQP yii-extension (http://www.yiiframework.com/extension/amqp)

Installation

  • Unpack all files under your project 'extension' folder
  • Set up your log route in main.php configuration file:

'components' => array( ........ ...

    'log' => array(
        'class' => 'CLogRouter',
        'routes' => array(

    ...

            array(
                'class' => 'application.extensions.MQLogRoute.CMQLogRoute',
                'enabled' => true,
                'levels' => 'info,error,warning',
                'mqID' => 'mq', // The name of component that represents camqp-extension.  You can use this extension: http://http://www.yiiframework.com/extension/amqp
                'mqExchange' => 'yiilog' // The name of MQ-exchange
            ),

........ ... ), ), ........ ) ...... - Enjoy! . .

Usage:

Write log by standart Yii's method

Yii::log('Writing to MQ!');

Changelog:

1.0 - Initial release

Be the first person to leave a comment

Please to leave your comment.

Create extension