Migrate WFE to the new PSR logger

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2021-02-11 16:17:37 +01:00
parent d45692ee96
commit 77a8ba0d11
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
1 changed files with 3 additions and 2 deletions

View File

@ -31,11 +31,12 @@ use OCP\IConfig;
use OCP\ILogger;
use OCP\Log\IDataLogger;
use OCP\Log\ILogFactory;
use Psr\Log\LoggerInterface;
class Logger {
/** @var ILogger */
protected $generalLogger;
/** @var ILogger */
/** @var LoggerInterface */
protected $flowLogger;
/** @var IConfig */
private $config;
@ -54,7 +55,7 @@ class Logger {
$default = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/flow.log';
$logFile = trim((string)$this->config->getAppValue(Application::APP_ID, 'logfile', $default));
if ($logFile !== '') {
$this->flowLogger = $this->logFactory->getCustomLogger($logFile);
$this->flowLogger = $this->logFactory->getCustomPsrLogger($logFile);
}
}