Skip to content

Commit 84d2791

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

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

apps/admin_audit/lib/AppInfo/Application.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
use OCA\AdminAudit\Actions\UserManagement;
5050
use OCA\AdminAudit\Actions\Versions;
5151
use OCA\AdminAudit\Listener\CriticalActionPerformedEventListener;
52+
use OCA\AdminAudit\Listener\GroupFolderActionListener;
5253
use OCP\App\ManagerEvent;
5354
use OCP\AppFramework\App;
5455
use OCP\AppFramework\Bootstrap\IBootContext;
@@ -65,6 +66,7 @@
6566
use OCP\Log\ILogFactory;
6667
use OCP\Share;
6768
use OCP\Util;
69+
use Psr\Container\ContainerInterface;
6870
use Psr\Log\LoggerInterface;
6971
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
7072
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -79,6 +81,10 @@ public function __construct() {
7981
}
8082

8183
public function register(IRegistrationContext $context): void {
84+
$context->registerService(LoggerInterface::class, function (ContainerInterface $c) {
85+
return $this->getLogger($c->get(IConfig::class), $c->get(ILogFactory::class));
86+
});
87+
8288
$context->registerEventListener(CriticalActionPerformedEvent::class, CriticalActionPerformedEventListener::class);
8389
}
8490

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace OCA\AdminAudit\Listener;
4+
5+
class GroupFolderActionListener {
6+
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace OCP\Files\Events;
4+
5+
class ACLChangedEvent {
6+
7+
}

0 commit comments

Comments
 (0)