public function testLegacyCalls()
 {
     $logPath = $this->getLogPath();
     $this->object->setPath($logPath);
     $this->initSyslogServer($logPath, true);
     $this->object->openlog('test', 0, Syslog::LOG_LOCAL0);
     $this->object->syslog(Syslog::LOG_NOTICE, 'test');
     $this->assertRegExp('/^<133>(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( |1|2|3)([0-9]) ([0-9]{2}):([0-9]{2}):([0-9]{2}) test: test$/', $this->getSyslogMessage());
     $this->object->closelog();
     $this->closeSyslogServer();
 }
Esempio n. 2
0
 /**
  * Logs the message
  *
  * @param \YapepBase\Log\Message\IMessage $message   The message to log.
  *
  * @return void
  */
 protected function logMessage(IMessage $message)
 {
     $this->connection->log($message->getPriority(), $this->getLogMessage($message));
 }