Monolog Handler for different kinds of logging

Code
<?php

use Monolog\Logger;
use 
Monolog\Handler\StreamHandler;

$logFile '/tmp/prod.log';

$handlers = [
    new 
StreamHandler($logFileLogger::WARNING),
];

$log = new Logger('name'$handlers);

$log->warning('Foo');
$log->error('Bar');

echo 
file_get_contents($logFile);
Result
[2024-12-21T12:37:22.135313+01:00] name.WARNING: Foo [] []
[2024-12-21T12:37:22.136393+01:00] name.ERROR: Bar [] []
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8