phpvms/app/Console/Logger.php

24 lines
431 B
PHP

<?php
namespace App\Console;
use Monolog\Handler\StreamHandler;
/**
* Just a simple custom logger that dumps to the console
* @package App\Console
*/
class Logger
{
public function __invoke(array $config)
{
$logger = new \Monolog\Logger('console');
try {
$logger->pushHandler(new StreamHandler('php://stdout'));
} catch (\Exception $e) {
}
return $logger;
}
}