1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/app/Logging/CustomizeSingleLogger.php
2021-09-25 20:13:01 -04:00

24 lines
713 B
PHP

<?php
namespace App\Logging;
class CustomizeSingleLogger
{
/**
* Customize the given logger instance.
*
* @param \Illuminate\Log\Logger $logger
*
* @return void
*/
public function __invoke($logger)
{
$logger->pushHandler(new \Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-info.log',
\Monolog\Logger::INFO, false));
$logger->pushHandler(new \Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-warning.log',
\Monolog\Logger::WARNING, false));
$logger->pushHandler(new \Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-error.log',
\Monolog\Logger::ERROR, false));
}
}