Exemplo n.º 1
0
 /**
  * @test
  * @group logger
  * @group logger-add-log
  **/
 public function ログを追記する()
 {
     Logger::init();
     Logger::addLog('test!');
     $log = Logger::getLog();
     $this->assertEquals('test!' . PHP_EOL, $log);
 }
Exemplo n.º 2
0
 /**
  * 現在のログを取得する
  *
  * @return string
  **/
 public static function getLog()
 {
     $registry = Registry::getInstance();
     if (!$registry->ifKeyExists('log')) {
         Logger::init();
     }
     return Registry::get('log');
 }
Exemplo n.º 3
0
 /**
  * コマンドの実行
  *
  * @param  array $params  パラメータ配列
  * @return void
  **/
 public function execute(array $params)
 {
     try {
         $this->params = $params;
         Logger::init();
         $plugins = $this->_getTragetPlugins();
         $this->_crawl($plugins);
         $this->_downloadEyeCatchImages();
         $this->_build();
         $this->_sendLog();
         $this->log('build!', 'success');
     } catch (\Exception $e) {
         $this->_sendErrorLog($e);
         $this->errorLog($e->getMessage());
     }
 }