Skip to content

Commit 2ee7056

Browse files
committed
ICL: Common centralized error handling added.
1 parent 5111a6f commit 2ee7056

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Loggable.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Support\Str;
66
use Illuminated\Console\Log\Formatter;
7+
use Monolog\ErrorHandler;
78
use Monolog\Handler\RotatingFileHandler;
89
use Monolog\Logger;
910
use Symfony\Component\Console\Input\InputInterface;
@@ -21,6 +22,8 @@ protected function initialize(InputInterface $input, OutputInterface $output)
2122
protected function initializeLogging()
2223
{
2324
$log = new Logger('ICL', $this->getLogHandlers());
25+
ErrorHandler::register($log);
26+
2427
$log->info('Hello World!');
2528
$log->info('Message with context!', [
2629
'isOkay' => true,

0 commit comments

Comments
 (0)