Strange behaviour at CEmailLogRoute with filter

For e-mail reporting on errors I’m using the CEmailLogRoute class.

Here my config. And it works fine.




'log'=>array(

	'class'=>'CLogRouter',

	'routes'=>array(

		array(

			'class'=>'CFileLogRoute',

			'logFile'=>'appinfo.log',

			'levels'=>'info',

			'categories'=>'',

		),

		array(

			'class'=>'CFileLogRoute',

			'logFile'=>'apptrace.log',

			'levels'=>'trace',

			'categories'=>'system.*',

		),

		array(

			'class'=>'CFileLogRoute',

			'logFile'=>'apperror.log',

			'levels'=>'error, warning',//, watch

			'categories'=>'error.*',

			//'filter'=>'CLogFilter',

		),

		array(

			'class' => 'CEmailLogRoute',

			'levels'=>'error, warning',

			'emails' => array('artalbum.org.ua@gmail.com'),

			'sentFrom' => 'webmaster@artalbum.org.ua',

			'subject' => 'Error at artalbum.org.ua',

			/*'filter' => array(

			    'class' => 'CLogFilter',

			    'prefixSession' => true,

			    'prefixUser' => false,

			    'logUser' => false,

			    //'logVars' => array('_SERVER'),

			),*/

        	),

	),

),



But if I uncomment ‘filter’ array strange behaviour starts - I get Email-messages on all requests (both for no errors and with errors). How attach ‘filter’ to receive messages only for errors?

Yii ver. 1.1.3

Thanks in advance

For the archive: I came across this problem too. This seems to be fixed with Revision e2552. Simply update.