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
[2020-08-11 12:45:43] name.WARNING: Foo [] []
[2020-08-11 12:45:43] name.ERROR: Bar [] []