X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/monolog/monolog/src/Monolog/Formatter
home
/
prisjneg
/
public_html
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Formatter
/
📁
..
📄
ChromePHPFormatter.php
(2.21 KB)
📄
ElasticaFormatter.php
(1.86 KB)
📄
ElasticsearchFormatter.php
(1.8 KB)
📄
FlowdockFormatter.php
(2.48 KB)
📄
FluentdFormatter.php
(2.03 KB)
📄
FormatterInterface.php
(870 B)
📄
GelfMessageFormatter.php
(4.85 KB)
📄
GoogleCloudLoggingFormatter.php
(1.15 KB)
📄
HtmlFormatter.php
(4.44 KB)
📄
JsonFormatter.php
(6.33 KB)
📄
LineFormatter.php
(9.52 KB)
📄
LogglyFormatter.php
(1.25 KB)
📄
LogmaticFormatter.php
(1.54 KB)
📄
LogstashFormatter.php
(3.35 KB)
📄
MongoDBFormatter.php
(4.81 KB)
📄
NormalizerFormatter.php
(9.93 KB)
📄
ScalarFormatter.php
(1.11 KB)
📄
SyslogFormatter.php
(1.85 KB)
📄
WildfireFormatter.php
(3.89 KB)
Editing: ScalarFormatter.php
<?php declare(strict_types=1); /* * This file is part of the Monolog package. * * (c) Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Formatter; use Monolog\LogRecord; /** * Formats data into an associative array of scalar (+ null) values. * Objects and arrays will be JSON encoded. * * @author Andrew Lawson <adlawson@gmail.com> */ class ScalarFormatter extends NormalizerFormatter { /** * @inheritDoc * * @phpstan-return array<string, scalar|null> $record */ public function format(LogRecord $record): array { $result = []; foreach ($record->toArray() as $key => $value) { $result[$key] = $this->toScalar($value); } return $result; } protected function toScalar(mixed $value): string|int|float|bool|null { $normalized = $this->normalize($value); if (\is_array($normalized)) { return $this->toJson($normalized, true); } return $normalized; } }
Upload File
Create Folder