public function append(LoggerLoggingEvent $event) { if ($this->sp || $this->dry) { if ($this->getLocationInfo()) { $event->getLocationInformation(); } if (!$this->getUseXml()) { $sEvent = serialize($event); if (!$this->dry) { fwrite($this->sp, $sEvent, strlen($sEvent)); } else { echo "DRY MODE OF SOCKET APPENDER: " . $sEvent; } } else { if (!$this->dry) { fwrite($this->sp, $this->xmlLayout->format($event)); } else { echo "DRY MODE OF SOCKET APPENDER: " . $this->xmlLayout->format($event); } } // not sure about it... if (!$this->dry) { fflush($this->sp); } } }
/** * @param LoggerLoggingEvent */ function append($event) { if ($this->sp) { LoggerLog::debug("LoggerAppenderSocket::append()"); if ($this->getLocationInfo()) { $event->getLocationInfo(); } if (!$this->getUseXml()) { $sEvent = serialize($event); @fwrite($this->sp, $sEvent, strlen($sEvent)); } else { @fwrite($this->sp, $this->xmlLayout->format($event)); } // not sure about it... @fflush($this->sp); } }