public function testDgramSockets()
 {
     $logPath = $this->getLogPath();
     $this->object->setFacility(Syslog::LOG_USER);
     $this->object->setPath($logPath);
     $this->object->setIdent('test');
     $this->initSyslogServer($logPath, true);
     $this->object->log(Syslog::LOG_NOTICE, 'test', 'test', mktime(15, 45, 19, 12, 6, 2011));
     $this->assertEquals('<13>Dec  6 15:45:19 test: test', $this->getSyslogMessage());
     $this->object->close();
     $this->closeSyslogServer();
 }
Exemple #2
0
 /**
  * Closes the syslog connection.
  *
  * @return void
  */
 public function __destruct()
 {
     $this->connection->close();
 }