phpvms/app/Console/Logger.php
2018-08-26 16:40:04 +00:00

24 lines
408 B
PHP

<?php
namespace App\Console;
use Monolog\Handler\StreamHandler;
/**
* Just a simple custom logger that dumps to the 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;
}
}