Skip to content

Commit c24b16e

Browse files
committed
Add dump channel
1 parent 249eb78 commit c24b16e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/Channels/DumpChannel.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the guanguans/laravel-exception-notify.
5+
*
6+
* (c) guanguans <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled.
9+
*/
10+
11+
namespace Guanguans\LaravelExceptionNotify\Channels;
12+
13+
class DumpChannel extends Channel
14+
{
15+
public function report(string $report)
16+
{
17+
dump($report);
18+
}
19+
}

src/ExceptionNotifyManager.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use Guanguans\LaravelExceptionNotify\Channels\ChanifyChannel;
1414
use Guanguans\LaravelExceptionNotify\Channels\DingTalkChannel;
15+
use Guanguans\LaravelExceptionNotify\Channels\DumpChannel;
1516
use Guanguans\LaravelExceptionNotify\Channels\FeiShuChannel;
1617
use Guanguans\LaravelExceptionNotify\Channels\LogChannel;
1718
use Guanguans\LaravelExceptionNotify\Channels\MailChannel;
@@ -223,6 +224,11 @@ protected function createDingTalkDriver()
223224
);
224225
}
225226

227+
protected function createDumpDriver()
228+
{
229+
return new DumpChannel();
230+
}
231+
226232
protected function createFeiShuDriver()
227233
{
228234
return new FeiShuChannel(

0 commit comments

Comments
 (0)