1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Logging/CustomizeSingleLogger.php

24 lines
713 B
PHP
Raw Normal View History

2021-09-26 02:13:01 +02:00
<?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));
}
}