/var/www/vhosts/ihelp.ro/httpdocs/vendor/monolog/monolog/src/Monolog/Formatter
NameSizeModeActions
ChromePHPFormatter.php22650644editdlrm
ElasticaFormatter.php20960644editdlrm
ElasticsearchFormatter.php19250644editdlrm
FlowdockFormatter.php25350644editdlrm
FluentdFormatter.php23450644editdlrm
FormatterInterface.php8700644editdlrm
GelfMessageFormatter.php47320644editdlrm
GoogleCloudLoggingFormatter.php11850644editdlrm
HtmlFormatter.php46240644editdlrm
JsonFormatter.php59910644editdlrm
LineFormatter.php77180644editdlrm
LogglyFormatter.php12800644editdlrm
LogmaticFormatter.php14990644editdlrm
LogstashFormatter.php35150644editdlrm
MongoDBFormatter.php49560644editdlrm
NormalizerFormatter.php87880644editdlrm
ScalarFormatter.php11360644editdlrm
SyslogFormatter.php19250644editdlrm
WildfireFormatter.php40630644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php (1136B)
* * 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 */ class ScalarFormatter extends NormalizerFormatter { /** * @inheritDoc * * @phpstan-return array $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; } }