debug() public static method

public static debug ( $msg, $context = [] )
Beispiel #1
0
 public function testUseSimpleLogger()
 {
     Logger::useSimpleLogger($this->_logFile);
     Logger::info('xxinfoxx');
     Logger::err('xxerrxx');
     Logger::debug('xxdebugxx');
     $contents = file_get_contents($this->_logFile);
     $ms = null;
     $this->assertEquals(1, preg_match('/xxinfoxx/', $contents, $ms));
     $this->assertEquals(1, preg_match('/xxerrxx/', $contents, $ms));
     $this->assertEquals(1, preg_match('/xxdebugxx/', $contents, $ms));
     Logger::useNullLogger();
     Logger::info('bbbb');
     $contents1 = file_get_contents($this->_logFile);
     $this->assertEquals($contents1, $contents);
 }
Beispiel #2
0
 public function stop()
 {
     Logger::debug(__CLASS__ . '::' . __METHOD__ . '()');
     if (!$this->_currentProcess->isCurrent()) {
         return;
     }
     $this->_stoped = true;
     foreach ($this->_children as $child) {
         try {
             $child->getProcess()->kill();
         } catch (Exception $ex) {
             Logger::err($ex);
         }
     }
     $this->_waitToEnd();
 }
Beispiel #3
0
 public function stop()
 {
     Logger::debug(__METHOD__ . ' before-stop');
     $this->_keeper->stop();
     Logger::debug(__METHOD__ . ' after-stop');
 }