Skip to content

Commit e6b3c99

Browse files
committed
chore: implement the same changes as summit-api
1 parent 6edc929 commit e6b3c99

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/Audit/AuditLogFormatterFactory.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@
2323
class AuditLogFormatterFactory implements IAuditLogFormatterFactory
2424
{
2525

26-
private array $config;
26+
private array $config = [];
2727

2828
public function __construct()
2929
{
30-
// cache the config so we don't hit config() repeatedly
31-
$this->config = config('audit_log', []);
30+
try
31+
{
32+
Log::debug("AuditLogFormatterFactory::construct loading audit_log config");
33+
$this->config = config('audit_log', []);
34+
}
35+
catch(\Exception $ex){
36+
Log::error('Failed to load audit_log configuration', ['exception' => $ex]);
37+
}
3238
}
3339

3440
public function make(AuditContext $ctx, $subject, $eventType): ?IAuditLogFormatter

0 commit comments

Comments
 (0)