Exemplo n.º 1
0
 public static function logFile($msg, $level = CLogger::LEVEL_INFO, $category = 'application')
 {
     $logger = Yii::getLogger();
     if ($logger === null) {
         $logger = new CLogger();
         Yii::setLogger($logger);
     }
     $logger->log($msg, $level, $category);
 }
Exemplo n.º 2
0
 public function startApp()
 {
     $config = (require $this->configFile);
     if (!isset($config['class'])) {
         $config['class'] = 'yii\\web\\Application';
     }
     /** @var \yii\web\Application $app */
     $this->app = Yii::createObject($config);
     $this->persistDb();
     $this->mockMailer($config);
     $this->mockAssetManager();
     \Yii::setLogger(new Logger());
 }