bigbasher
(Adriaan)
October 5, 2011, 4:56pm
1
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?
tri
(tri - Tommy Riboe)
October 5, 2011, 5:59pm
2
bigbasher:
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
bigbasher
(Adriaan)
October 5, 2011, 6:12pm
3
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.
tri
(tri - Tommy Riboe)
October 5, 2011, 6:38pm
4
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
bigbasher
(Adriaan)
October 5, 2011, 6:41pm
5
tri:
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.
guaruja
(Wilnis)
November 8, 2012, 5:33pm
6
tri:
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
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)