Skip to content

Commit 65a4ab2

Browse files
authored
Merge pull request #2 from megaxlr/master
Fix role not getting tagged due to incorrect class constructor
2 parents 3917c0d + ec39750 commit 65a4ab2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/DiscordHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class DiscordHandler extends AbstractProcessingHandler
2929
* @param bool $bubble
3030
* @param null $roleId
3131
*/
32-
public function __construct($webhook, $name, $subname = '', $level = Logger::DEBUG, $bubble = true, $roleId =null)
32+
public function __construct($webhook, $name, $subname = '', $level = Logger::DEBUG, $bubble = true, $roleId = null)
3333
{
3434
$this->name = $name;
3535
$this->subname = $subname;
@@ -71,3 +71,4 @@ protected function write(array $record)
7171
]);
7272
}
7373
}
74+

src/DiscordLogger.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ class DiscordLogger
1515
public function __invoke(array $config)
1616
{
1717
$log = new Logger('discord');
18-
$log->pushHandler(new DiscordHandler($config['webhook'], config('app.name'), null, $config['level'] ?? 'DEBUG'), $config['role_id'] ?? null);
18+
$log->pushHandler(new DiscordHandler($config['webhook'], config('app.name'), null, $config['level'] ?? 'DEBUG', true, $config['role_id'] ?? null));
1919

2020
return $log;
2121
}
2222
}
23+

0 commit comments

Comments
 (0)