bnomei/kirby3-monolog

View on GitHub
classes/KirbyFormatter.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Bnomei;

final class KirbyFormatter extends \Monolog\Formatter\LineFormatter
{
    protected function normalize($data, $depth = 0): mixed
    {
        if ($data && is_a($data, \Kirby\Cms\Field::class)) {
            return $data->value();
        }

        return parent::normalize($data, $depth);
    }
}