namespace Symfony\Bridge\Monolog\Tests;
use Monolog\Logger;
use Monolog\LogRecord;
class RecordFactory{ public static function create(int|string
$level = 'warning', string|\Stringable
$message = 'test', string
$channel = 'test', array
$context =
[], \DateTimeImmutable
$datetime =
new \
DateTimeImmutable(), array
$extra =
[]): LogRecord|array
{ $level = Logger::
toMonologLevel($level);
if (Logger::API >= 3
) { return new LogRecord( message:
(string) $message,
context:
$context,
level:
$level,
channel:
$channel,
datetime:
$datetime,
extra:
$extra,
);
}