Example #1
0
 /**
  * Tests DEBUG logging with debug()
  *
  * @author Nikos Dimopoulos <*****@*****.**>
  * @since  2012-09-17
  */
 public function testDebugLogging()
 {
     $fileName = $this->getFileName('log', 'log');
     $logger = new PhLoggerAdapterFile($this->logPath . $fileName);
     $logger->debug('Hello');
     $logger->close();
     $contents = file($this->logPath . $fileName);
     $found = strpos($contents[0], '[DEBUG]');
     $this->assertTrue($found !== FALSE, 'Debug logging is not set to DEBUG');
     $found = strpos($contents[0], 'Hello');
     $this->assertTrue($found !== FALSE, 'Debug logging does not set correct message');
     $this->cleanFile($this->logPath, $fileName);
 }
Example #2
0
 public function debug($msg)
 {
     $this->logger->debug($msg);
 }