CLogroute.php out of memory

I am getting this error on a fairly intensive console app:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1048576 bytes) in C:\www\htdocs\yii\framework\logging\CLogRoute.php on line 93

Any ideas? Is there some way to flush the logger - it doesnt seem to write when in this loop?

This may help you out. I’ve never used it, though.

/Tommy

Forgive me for being thick, but whree do I set this? In config I have




		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning',                        

                    'logFile'=>'console.log',

                    'logPath'=>$logpath

                ),

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning, trace, info',                        

                    'logFile'=>'consoletrace.log',

                    'logPath'=>$logpath

                ),

            ),

        ),



I tried adding it here and got : Property "CLogRouter.autoDump" is not defined.

It’s a public property of CLogger.

I’m not sure but I would try


Yii::getLogger()->autodump = true;

You can also search the forum, similar issues has been discussed before.

/Tommy

Thanks - I will try that.

For everybody searching same topic: it’s




Yii::getLogger()->autoDump = true;



(with CAPITAL "D"). worked fine (for me at last).

(place it right at the beginning of your script)