phpvms/app/Console/Logger.php

24 lines
431 B
PHP
Raw Normal View History

<?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;
}
}