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