Write a message to the log

@param array $event log data event
@return void
499838
protected function doWrite(array $event)
	{
		try {
			$event = $this->formatter->format($event);
			$params = [
				'body' => []
			];

			$params['body'][] = [
				'index' => [
					'_index' => $event['_index'],
					'_type' => $event['_type'],
				],
			];
			unset($event['_index'], $event['_type']);

			$params['body'][] = $event;

			$responses = $this->client->bulk($params);

			if ($responses['errors'] === true) {
				throw new RuntimeException('Elasticsearch returned error for one of the records');
			}
		} catch (\Throwable $exception) {
			if (!$this->options['ignore_error']) {
				throw new RuntimeException('Error sending messages to Elasticsearch', 0, $exception);
			}
		}
	}
984643
private function formatEventMessage(Event $event)
    {
        $message = null;
        $entityName = null;
        
        if ($event instanceof OrmEventInterface) {
            switch (true) {
                case ($event instanceof EntityLifecycleEvent):
                    $entityName = $event->getRepository()->getEntityName();
                    $message = $this->entityToString($event->getEntity());
                    break;
                case ($event instanceof MetadataLoadEvent):
                    $message = $this->metadataToString($event->getMetadata());
                    $entityName = $event->getMetadata()->getEntityClass();
                    break;
                case ($event instanceof FinderExecutionEvent):
                    $entityName = $event->getRepository()->getEntityName();
                    $query = $event->getSelectQuery();
                    $message = sprintf("SQL: (%s)", str_replace("\n", "\x20", $query->toSQL()));
                    break;
            }
        }
        
        $eventName = sprintf('%s::%s', (new \ReflectionObject($event))->getShortName(), $event->getName());
        $separator = str_repeat('-', 32);
        
        return sprintf("%s\n[%s]\nEntityClassName: %s\n%s", $separator, $eventName, $entityName, $message);
    }
1344966
protected function write(array $record) {
        if ($this->exception) {
            throw $this->exception;
        }

        $this->stream->write((string) $record['formatted'])->onResolve($this->onResolve);
    }
1346614
protected function write(array $manifest)
    {
        file_put_contents(
            $this->manifestPath,
            '<?php return '.var_export($manifest, true).';'
        );

        $this->invalidate($this->manifestPath);
    }
177899
public function messageLogged(BuildEvent $event)
    {
        $priority = $event->getPriority();
        if ($priority <= $this->msgOutputLevel) {
            $this->bar->setMessage(str_replace(["\n", "\r"], ["", ""], $event->getMessage()));
            $this->bar->display();
        }
    }
580496
protected function writeToLog($entry) {
		if ($entry[0] >= $this->logLevel) {
			trigger_error("** ".$this->getFormattedCaller()." ** {$entry[1]} **",$this->loggerTypes[$entry[0]]->getPhpErrorCode());
		}
	}
892805
public function log($message)
    {
        $formattedMessage = $this->formatMessage($message);
        if (!empty($formattedMessage)) {
            $this->logger->info($formattedMessage);
        }
    }
955190
protected function execute($event)
    {
        foreach($this->events[$event] as $handler) {
            $this->listen($event, $handler);
        }
    }
939519
function writeToLog($message) {
		if ($this->logFile) {
			$timestamp = date("Y-m-d H:i:s");
			$timestamp = str_pad($timestamp, 20);
			if (isset($_SERVER["REMOTE_ADDR"])) {
				$ip = $_SERVER["REMOTE_ADDR"];
			} else {
				$ip = "Unknown IP";
			}
			$ip = str_pad($ip, 15);
			$taggedMessage = "$timestamp $ip $message\n";
			file_put_contents($this->logFile, $taggedMessage, FILE_APPEND);
		}
		if ($this->logCallback) {
			call_user_func_array($this->logCallback, array($message));
		}
	}
412138
public function sendEvent(Event $event)
    {
        try {
            $this->eventFactory->addDefaultTagsToEntity($event);
            $this->sendEventThroughSenders($event);
        } catch (\Exception $exception) {
            $this->logException($exception);
        }
    }
1100231
public function send(Event $event)
    {
        $level = $this->getEventLevel($event);
        $message = $this->getEventMessage($event);
        $tags = $this->getEventTags($event);

        $this->logger->log($level, $message, $tags);
    }
465422
protected function write(array $record): void
    {
        if (!$this->isWebRequest()) {
            return;
        }

        self::$json['rows'][] = $record['formatted'];

        $this->send();
    }
403146
public function logMessage($message)
    {
        $this->logger->info(strip_tags($message));

        if ($this->sendToBrowser) {
            $this->sendMessageToBrowser($message);
        }

        if ($this->sendToCli) {
            $this->sendMessageToCli($message);
        }
    }
603674
public function writeMethodCalledLog(Events\MethodCalled $event)
    {
        Log::info("{$event->driver} {$event->gateway} Method Has Called", [$event->endpoint, $event->payload]);
    }
95938
protected function write(array $data)
    {
        $changes = $this->getChanges($data);

        $this->syncUpdated($changes['updated']);
        $this->syncInserted($changes['inserted']);
        $this->syncDeleted($changes['deleted']);
    }
1200545
public function recordThat(Message $event): void
    {
        if (! \array_key_exists($event->messageName(), $this->eventApplyMap)) {
            throw new \RuntimeException('Wrong event recording detected. Unknown event passed to GenericAggregateRoot: ' . $event->messageName());
        }

        $this->version += 1;

        $event = $event->withAddedMetadata('_aggregate_id', $this->aggregateId());
        $event = $event->withAddedMetadata('_aggregate_version', $this->version);
        $this->recordedEvents[] = $event;

        $this->apply($event);
    }
1238533
public function log($message)
    {
        if ($this->progress) {
            $this->progress->setMessage($message);
            $this->logs[] = $message;
        } else {
            $this->output->writeLn($message);
        }
    }