AccessibilityController to LoggerInterface
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
c7c5150ddb
commit
900e7f99aa
|
@ -40,9 +40,9 @@ use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\DataDisplayResponse;
|
use OCP\AppFramework\Http\DataDisplayResponse;
|
||||||
use OCP\AppFramework\Utility\ITimeFactory;
|
use OCP\AppFramework\Utility\ITimeFactory;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\ILogger;
|
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
use ScssPhp\ScssPhp\Compiler;
|
use ScssPhp\ScssPhp\Compiler;
|
||||||
use ScssPhp\ScssPhp\Exception\ParserException;
|
use ScssPhp\ScssPhp\Exception\ParserException;
|
||||||
use ScssPhp\ScssPhp\Formatter\Crunched;
|
use ScssPhp\ScssPhp\Formatter\Crunched;
|
||||||
|
@ -58,7 +58,7 @@ class AccessibilityController extends Controller {
|
||||||
/** @var IConfig */
|
/** @var IConfig */
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
/** @var ILogger */
|
/** @var LoggerInterface */
|
||||||
private $logger;
|
private $logger;
|
||||||
|
|
||||||
/** @var ITimeFactory */
|
/** @var ITimeFactory */
|
||||||
|
@ -82,7 +82,7 @@ class AccessibilityController extends Controller {
|
||||||
public function __construct(string $appName,
|
public function __construct(string $appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
IConfig $config,
|
IConfig $config,
|
||||||
ILogger $logger,
|
LoggerInterface $logger,
|
||||||
ITimeFactory $timeFactory,
|
ITimeFactory $timeFactory,
|
||||||
IUserSession $userSession,
|
IUserSession $userSession,
|
||||||
IAppManager $appManager,
|
IAppManager $appManager,
|
||||||
|
@ -146,7 +146,12 @@ class AccessibilityController extends Controller {
|
||||||
'@import "css-variables.scss";'
|
'@import "css-variables.scss";'
|
||||||
);
|
);
|
||||||
} catch (ParserException $e) {
|
} catch (ParserException $e) {
|
||||||
$this->logger->error($e->getMessage(), ['app' => 'core']);
|
$this->logger->error($e->getMessage(),
|
||||||
|
[
|
||||||
|
'app' => 'core',
|
||||||
|
'exception' => $e,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +260,12 @@ class AccessibilityController extends Controller {
|
||||||
$scss->compile($variables);
|
$scss->compile($variables);
|
||||||
$this->injectedVariables = $variables;
|
$this->injectedVariables = $variables;
|
||||||
} catch (ParserException $e) {
|
} catch (ParserException $e) {
|
||||||
$this->logger->logException($e, ['app' => 'core']);
|
$this->logger->error($e->getMessage(),
|
||||||
|
[
|
||||||
|
'app' => 'core',
|
||||||
|
'exception' => $e,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $variables;
|
return $variables;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue