PHP Method Yii::setLogger Code Examples

This page contains top rated real world PHP examples of method Yii::setLogger extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: Utils.php Project: giangnh264/mobileplus
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);
 }
Example #2
Show file File: Yii2.php Project: solutionDrive/Codeception
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());
 }