Logging in Long running Console app

I know that is an old post, but just to keep it updated

Worked for me:

http://www.yiiframework.com/wiki/140/real-time-logging

I know too, this is an old post, and the time it’s written, the following couldn’t worked, but to keep it updated for anyone (like me), who are searching for solution here, from 1.1.8, there is CLogger::autoDump, what you can set to true after including yii. With this and CLogger::autoFlush = 1, logging becomes real time.


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

Yii::getLogger()->autoFlush=1;