Skip to content

Commit a307c9e

Browse files
committed
Fix the logger that is imported for critical actions
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 8a52591 commit a307c9e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/admin_audit/lib/AppInfo/Application.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
use OCP\Log\ILogFactory;
6666
use OCP\Share;
6767
use OCP\Util;
68+
use Psr\Container\ContainerInterface;
6869
use Psr\Log\LoggerInterface;
6970
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
7071
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -79,6 +80,10 @@ public function __construct() {
7980
}
8081

8182
public function register(IRegistrationContext $context): void {
83+
$context->registerService(LoggerInterface::class, function (ContainerInterface $c) {
84+
return $this->getLogger($c->get(IConfig::class), $c->get(ILogFactory::class));
85+
});
86+
8287
$context->registerEventListener(CriticalActionPerformedEvent::class, CriticalActionPerformedEventListener::class);
8388
}
8489

0 commit comments

Comments
 (0)