Set up logger instance in base constructor. Fixes #270

Signed-off-by: Holger Schletz <holger.schletz@web.de>
This commit is contained in:
hschletz
2025-04-22 17:51:32 +02:00
committed by Holger Schletz
parent 79ae3e9235
commit 21fa01c4ba
7 changed files with 19 additions and 14 deletions

View File

@@ -43,7 +43,7 @@ class SMB extends Base {
$command = self::SMBCLIENT.' '.escapeshellarg('//' . $this->host . '/dummy').' -U '.$uidEscaped.'%'.$password;
$lastline = exec($command, $output, $retval);
if ($retval === 127) {
\OC::$server->getLogger()->error(
$this->logger->error(
'ERROR: smbclient executable missing',
['app' => 'user_external']
);
@@ -56,7 +56,7 @@ class SMB extends Base {
goto login;
} elseif ($retval !== 0) {
//some other error
\OC::$server->getLogger()->error(
$this->logger->error(
'ERROR: smbclient error: ' . trim($lastline),
['app' => 'user_external']
);