@param array $record

@return bool
174946
private function isDeprecationLog(array $record)
    {
        $isPhpChannel = 'php' === $record['channel'];
        $isDeprecationError = isset($record['context']['type']) && E_USER_DEPRECATED === $record['context']['type'];
        $looksLikeDeprecationMessage = false !== strpos($record['message'], 'deprecated since');

        return $isPhpChannel && ($isDeprecationError || $looksLikeDeprecationMessage);
    }
135916
protected function write(array $record)
    {
        \assert('array_key_exists(\'formatted\', $record)');
        $this->notification
            ->setTitle(sprintf('[%s] %s', Logger::getLevelName($this->level), $this->name))
            ->setBody($record['formatted']);
        $this->notifier && $this->notifier->send($this->notification);
    }
358367
public static function format(array $record)
    {
        $seconds = (int) $record['time'];
        $millis = floor(($record['time'] - $seconds) * 1000);
        $timestamp = date('Y-m-d H:i:s', $seconds);
        $timestamp .= sprintf('.%03d ', $millis);
        $timestamp .= date('P');
        $level = '[' . $record['level'] . ']';
        $message = '';
        $message .= Logger::interpolate($record['message'], $record['context']);
        if (isset($record['context']['file'])) {
            $message .= ' in ' . $record['context']['file'];
        }
        if (isset($record['context']['line'])) {
            $message .= ' on line ' . $record['context']['line'];
        }
        return $timestamp . ' ' . $level . ' ' . $message . PHP_EOL;
    }
1288783
public function format(array $record)
    {
        $output = $this->addTitle($record['level_name'], $record['level']);
        $output .= '<table cellspacing="1" width="100%" class="monolog-output">';

        if (isset($record['context']['bug'])) {
            $bug = $record['context']['bug'];
            if ($bug instanceof Bug) {
                $output .= $this->addRow('Bug ID', $bug->getId());
                $output .= $this->addRow('Bug Title', $bug->getTitle());
                $output .= $this->addRow('Task Title', $bug->getTask()->getTitle());
                $output .= $this->addRow('Bug Message', $record['message']);
            }
            if (isset($record['context']['path'])) {
                $path = $record['context']['path'];
                if ($path instanceof Path) {
                    $embeddedTable = '<table cellspacing="1" width="100%">';
                    foreach ($path as $index => $step) {
                        $embeddedTable .= $this->addRow('Step', $this->convertToString($index + 1));
                        $embeddedTable .= $this->addRow('Transition', $this->convertToString($step[0]));
                        $embeddedTable .= $this->addRow('Data', $this->convertToString($step[1]));
                        $embeddedTable .= $this->addRow('Places', $this->convertToString(implode('|', $step[2])));

                        $transitionName = $step[0];
                        $subject = $record['context']['subject'];
                        if ($transitionName && $subject instanceof AbstractSubject) {
                            $url = $subject->getScreenshotUrl($bug->getId(), $index);
                            if ($url) {
                                $embeddedTable .= $this->addRow('Screenshot', $this->addImage($url), false);
                            }
                        }
                    }
                    $embeddedTable .= '</table>';
                    $output .= $this->addRow('Steps', $embeddedTable, false);
                }
            }
        }

        return $output.'</table>';
    }
307739
private function processRecord(array $record): ?int
    {
        $requestId = $record['requestId'];

        $content = 0 === $record['contentLength'] ? null : $record['contentData'];

        if (DaemonInterface::FCGI_BEGIN_REQUEST === $record['type']) {
            $this->processBeginRequestRecord($requestId, $content);
        } elseif (!isset($this->requests[$requestId])) {
            throw new ProtocolException('Invalid request id for record of type: '.$record['type']);
        } elseif (DaemonInterface::FCGI_PARAMS === $record['type']) {
            while (null !== $content && strlen($content) > 0) {
                $this->readNameValuePair($requestId, $content);
            }
        } elseif (DaemonInterface::FCGI_STDIN === $record['type']) {
            if (null !== $content) {
                fwrite($this->requests[$requestId]['stdin'], $content);
            } else {
                // Returns the status code
                return $this->dispatchRequest($requestId);
            }
        } elseif (DaemonInterface::FCGI_ABORT_REQUEST === $record['type']) {
            $this->endRequest($requestId);
        } else {
            throw new ProtocolException('Unexpected packet of type: '.$record['type']);
        }

        return null; // No status code to return
    }
791222
public function format(array $record)
    {
        $jsonString = json_encode($this->getOutputRecord($record));

        if ($jsonString === false) {
            throw new \RuntimeException('Error happened during the log format process! (json encode error)');
        }

        return $jsonString . PHP_EOL;
    }
894017
protected function canDelete($record)
	{
		if (empty($record->id) || $record->published != -2)
		{
			return false;
		}

		return JFactory::getUser()->authorise('core.delete', $record->extension . '.category.' . (int) $record->id);
	}
803498
protected function write(array $record)
    {
        if ($this->url && !file_exists($this->url)) {
            $this->stream = null;
        }
        parent::write($record);
    }
709341
private function formatMessage(array $record)
    {
        $message = $this->processStringPlaceholders($record['message'], $record['context']);
        $message = $this->formatStringAsTextBlock($message);

        return $message;
    }
886879
protected function write(array $record) {
        $context = '';
        if (isset($record['context']) && is_array($record['context']) && (count($record['context']) > 0)) {
            $flattenedContext = [];
            foreach($record['context'] as $key => $value) {
                if (is_array($value)) {
                    continue;
                }

                $flattenedContext[] = "$key = $value";
            }

            $context = implode(", ", $flattenedContext);
        }

        $this->logger->log($record['channel'], $record['level_name'], $record['message'], $context);
    }
4628
protected static function handler_from_record($record) {
        $classname = $record->classname;
        if (strpos($classname, '\\') !== 0) {
            $classname = '\\' . $classname;
        }
        if (!class_exists($classname)) {
            return false;
        }

        $handler = new $classname;
        if (isset($record->id)) {
            $handler->set_id($record->id);
        }
        $handler->set_component($record->component);

        // Overload fields which can be modified.
        if (isset($record->defaultexpiration)) {
            $handler->set_defaultexpiration($record->defaultexpiration);
        }

        if (isset($record->validateaddress)) {
            $handler->set_validateaddress($record->validateaddress);
        }

        if (isset($record->enabled)) {
            $handler->set_enabled($record->enabled);
        }

        return $handler;
    }
1077622
private function formatLogLevel(array $record)
    {
        if (!isset($record['level_name'])) {
            return '';
        }

        $level = $record['level_name'];
        $levelLabels = array(
            'DEBUG' => '',
            'INFO' => '',
            'WARNING' => '** WARNING ** ==> ',
            'ERROR' => '*** ERROR *** ==> ',
            'CRITICAL' => '*** CRITICAL ERROR *** ==> ',
        );

        return array_key_exists($level, $levelLabels) ? $levelLabels[$level] : $level.' ';
    }
1353076
private function formatExtra(array $record)
    {
        $extra = $this->formatDateTimeObjects($record['extra']);
        $extraAsString = Yaml::dump(array('extra' => $extra), 1, $this->prefixLength);
        $extraAsString = $this->formatTextBlock($extraAsString, '--> ');

        return $extraAsString;
    }
845433
public function new(array $record = [])
    {
        $record = $this->prepareBaseRecord($record);

        return $this->cleanClone()->addPristineRecord($record, ['isCasted' => true])->markAsNew();
    }
416045
protected function write(array $record): void
    {
        if ($record['level'] < Logger::NOTICE) {
            $this->handleDebugRecord($record);
        } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
            $this->handleExceptionRecord($record);
        } else {
            $this->handleErrorRecord($record);
        }
    }
820654
protected function write(array $record)
    {
        $chat_id = $this->bot->getChatLog();
        // Check chat_id is valid
        if ($chat_id !== "") {
            $this->bot->withChatId($chat_id, 'sendMessage', $record['message']);
        }
    }
473941
public function format(array $record)
    {
        $emoji = $this->getEmojiForLevel($record['level']);
        $output = parent::format($record);

        return $emoji . $output;
    }