Writes log message.

@param mixed $logData logger data
559758
public function log($logData)
    {
        $handle = fopen($this->getLogFilePath(), "a+");
        if ($handle !== false) {
            if (is_string($logData)) {
                parse_str($logData, $result);
            } else {
                $result = $logData;
            }

            if (is_array($result)) {
                foreach ($result as $key => $value) {
                    if (is_string($value)) {
                        $result[$key] = urldecode($value);
                    }
                }
            }

            fwrite($handle, "======================= " . $this->getTitle() . " [" . date("Y-m-d H:i:s") . "] ======================= #\n\n");
            fwrite($handle, "SESS ID: " . $this->getLoggerSessionId() . "\n");
            fwrite($handle, trim(var_export($result, true)) . "\n\n");
            fclose($handle);
        }

        //resetting log title
        $this->setTitle('');
    }
132792
public void writeCData(String data) throws XMLStreamException {
		try {
			this.checkPendingATEvents();
			// CDATA
			this.writeCharacters(data);
		} catch (Exception e) {
			throw new XMLStreamException(e.getLocalizedMessage(), e);
		}
	}
928922
public static function writeLog($logName, $level, $key, $data)
    {
        $levelArray = array(
            'warn'		=>	Logger::WARNING,
            'info'		=>	Logger::INFO,
            'alert'		=>	Logger::ALERT,
            'debug'		=>	Logger::DEBUG,
            'notice'	=>	Logger::NOTICE,
            'error'		=>	Logger::ERROR,
        );
        $logLevel = $levelArray[$level];
        $logger = new Logger($logName);
        $stream = new StreamHandler(static::getLogPath($logName), $logLevel);

        $logger->pushHandler(new BufferHandler($stream, 10000, $logLevel, true, true));

        if ($level == 'warn') {
            $logger->warn($key, $data);
        } else if ($level == 'info') {
            $logger->info($key, $data);
        } else if ($level == 'alert') {
            $logger->alert($key, $data);
        } else if ($level == 'debug') {
            $logger->debug($key, $data);
        } else if ($level == 'notice') {
            $logger->notice($key, $data);
        } else if ($level == 'error') {
            $logger->error($key, $data);
        }
    }
1111103
public static function WriteLog($iOrderId, $sData)
    {
        /** @var $oItem TdbShopOrderExportLog */
        $oItem = TdbShopOrderExportLog::GetNewInstance();
        /** @var Request $request */
        $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
        $ip = $request->getClientIp();
        $aData = array('shop_order_id' => $iOrderId, 'datecreated' => date('Y-m-d H:i:s'), 'ip' => $ip, 'data' => $sData, 'user_session_id' => session_id());
        $oItem->LoadFromRow($aData);
        $oItem->AllowEditByAll(true);
        $oItem->Save();
    }
208315
public function logVerbose()
  {
    if ($this->getVerbosity()>=OutputInterface::VERBOSITY_VERBOSE)
    {
      $args   = func_get_args();
      $format = array_shift($args);

      $this->writeln(vsprintf('<info>'.$format.'</info>', $args));
    }
  }
1071185
private function sendEventData(array $eventData)
    {
        $socket = $this->prepareSocket();
        $datagram = json_encode($eventData);
        $result = socket_write($socket, $datagram, strlen($datagram));
        if ($result === false) {
            $this->prepareSocket(true);
        }
        return $result;
    }
536
protected function write(string $data)
    {
        $this->clearTimeout();
        $this->conn->write($data . static::NEW_LINE);
        $this->log('<-' . $data);
        $this->setTimeout();
    }
801299
public function handle_message(\stdClass $messagedata) {
        $this->record = $this->get_data();
        return $this->handler->process_message($this->record, $messagedata);
    }
291628
public function dispatchEvent($eventData)
    {
        $event = $this->eventPrefix.'.'.$eventData['event'];
        unset($eventData['event']);

        $eventData[RecordHandler::COL_PLUGIN] = $this;
        $this->dispatcher->dispatch($event, [$eventData]);
    }
107718
public static function log($msg, $logLevel = X_LOG_DEBUG) {
        /** @var Logger $logger */
        $logger = ComponentFactory::getComponent('logger');
        $logger->log($msg, $logLevel, 2);
    }
806073
public function formatTemplateData($viewData = [])
    {
        $log = '';
        reset($viewData);
        foreach ($viewData as $viewName => $viewDataObject) {
            // show debbuging information
            $log .= "TemplateData[$viewName] : <br />\n";
            $log .= print_r($viewDataObject, 1);
        }

        return $log;
    }
982297
public static function doLog( $logMethod, array $data, &$output )
    {
        list( $host, $port, $types ) = eZPerfLoggerINI::variableMulti( 'StatsdSettings', array( 'Host', 'Port', 'VariableTypes' ) );

        // Failures in any of this should be silently ignored
        try
        {
            $strings = array();
            foreach ( $data as $varName => $value )
            {
                $type = ( isset( $types[$varName] ) && $types[$varName] != '' ) ? $types[$varName] : 'ms';
                $strings[] = static::transformVarName( $varName ) . ":{$value}|$type";
            }

            $fp = fsockopen( "udp://$host", (int)$port, $errNo, $errStr );
            if ( !$fp )
            {
                eZPerfLoggerDebug::writeWarning( "Could not open udp socket to $host:$port - $errStr", __METHOD__ );
                return;
            }
            if ( eZPerfLoggerINI::variable( 'StatsdSettings', 'SendMetricsInSinglePacket' ) == 'enabled' )
            {
                fwrite( $fp, implode( "\n", $strings ) );
            }
            else
            {
                foreach ( $strings as $string )
                {
                    fwrite( $fp, $string );
                }
            }
            fclose( $fp );
        } catch ( Exception $e )
        {
        }
    }
591464
public function write($data):void
    {
        if (null !== $this->file) {
            $this->file->write($data);
        }
    }
587228
public function saveEvent($eventData)
    {
        $serializedEvent = $this->jsonSerializer->serialize($eventData);
        $insertData = ['event_id' => md5($serializedEvent . time()), 'data' => $serializedEvent];
        $this->getConnection()->insertOnDuplicate($this->getMainTable(), $insertData, ['data']);
    }
23671
private function writeLogs(): void
    {
        // Write logs
        $fileName = $this->getApp()->getConfig()->getDirectory(ConfigInterface::DIR_VAR_LOGS) . '/Berlioz.log';

        if (is_resource($this->fp) || is_resource($this->fp = @fopen($fileName, 'a'))) {
            if (count($this->logs) > 0) {
                foreach ($this->logs as $key => $log) {
                    if (!$log['written']) {
                        $line = sprintf("%-26s %-11s %s\n",
                                        \DateTime::createFromFormat('U.u', number_format($log['time'], 6, '.', ''))
                                                 ->format('Y-m-d H:i:s.u'),
                                        '[' . $log['level'] . ']',
                                        $log['message']);

                        if (@fwrite($this->fp, $line) !== false) {
                            $this->logs[$key]['written'] = true;
                        }
                    }
                }
            }
            unset($log);
        }
    }
81414
private function writeCdata($cdata)
    {
        $xml1 = defined('ENT_XML1') ? ENT_XML1 : 16;

        $cdata = htmlspecialchars($cdata, $xml1 | ENT_COMPAT);

        $this->outString .= '<![CDATA[' . $cdata . ']]>';
    }
837896
public function write(string $data) : void
    {
        $this->buffer .= $data;

        if (strlen($this->buffer) >= $this->size) {
            $this->flush();
        }
    }