I tried Yii::app()->log->processLogs(), it works at the moment
but can’t let console application logging all the runtime, it should not be that, right?
what does your mean?
Maybe it is the problem, below are all my testing script.
I use testing script that only echo some text and also log something, but the same result, nothing happened…
here is my testing code:
class TestCommand extends CConsoleCommand{
public function actionIndex(){
echo 'test'.PHP_EOL;
Yii::trace('test');
}
}
and
php console.php test
my bootstrap "console.php":
// change the following paths if necessary
$yii=dirname(__FILE__).'/../yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/console.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createConsoleApplication($config)->run();