Skip to content

Commit 3118694

Browse files
committed
replaced ILogger
1 parent 0b0351a commit 3118694

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎lib/User/UserAccountDeletionJob.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use OCA\NextMagentaCloudProvisioning\Db\UserQueries;
66
use OCP\AppFramework\Utility\ITimeFactory;
77
use OCP\BackgroundJob\TimedJob;
8-
use OCP\ILogger;
98
use OCP\IUserManager;
109
use Psr\Log\LoggerInterface;
1110

@@ -92,7 +91,7 @@ public function run($arguments) {
9291
} catch (\Throwable $e) {
9392
$this->logger->logException($e, [
9493
'message' => "Deletion failed for $uid: " . $e->getMessage(),
95-
'level' => ILogger::ERROR,
94+
'level' => 3,
9695
'app' => 'nmcprovisioning'
9796
]);
9897
continue; // jump to the next user in case of errors

‎tests/integration/UserDeletionDbTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use OCA\UserOIDC\Db\UserMapper;
1414
use OCP\Accounts\IAccountManager;
1515
use OCP\IConfig;
16-
use OCP\ILogger;
1716
use OCP\IUserManager;
17+
use Psr\Log\LoggerInterface;
1818

1919
class UserDeletionDbTest extends StackedCleanupTestCase {
2020
public function setUp(): void {
@@ -31,7 +31,7 @@ public function setUp(): void {
3131
//$this->config->setSystemValue('datadirectory', '/var/www/html/data');
3232
//$this->config->setSystemValue('dbtype', 'sqlite3');
3333

34-
$this->logger = $this->app->getContainer()->get(ILogger::class);
34+
$this->logger = $this->app->getContainer()->get(LoggerInterface::class);
3535
$this->userServiceMock = $this->getMockBuilder(NmcUserService::class)
3636
->setConstructorArgs([ $this->app->getContainer()->get(IUserManager::class),
3737
$this->app->getContainer()->get(IAccountManager::class),

0 commit comments

Comments
 (0)