Migrate WFE to the new PSR logger
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
d45692ee96
commit
77a8ba0d11
|
@ -31,11 +31,12 @@ use OCP\IConfig;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
use OCP\Log\IDataLogger;
|
use OCP\Log\IDataLogger;
|
||||||
use OCP\Log\ILogFactory;
|
use OCP\Log\ILogFactory;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class Logger {
|
class Logger {
|
||||||
/** @var ILogger */
|
/** @var ILogger */
|
||||||
protected $generalLogger;
|
protected $generalLogger;
|
||||||
/** @var ILogger */
|
/** @var LoggerInterface */
|
||||||
protected $flowLogger;
|
protected $flowLogger;
|
||||||
/** @var IConfig */
|
/** @var IConfig */
|
||||||
private $config;
|
private $config;
|
||||||
|
@ -54,7 +55,7 @@ class Logger {
|
||||||
$default = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/flow.log';
|
$default = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/flow.log';
|
||||||
$logFile = trim((string)$this->config->getAppValue(Application::APP_ID, 'logfile', $default));
|
$logFile = trim((string)$this->config->getAppValue(Application::APP_ID, 'logfile', $default));
|
||||||
if ($logFile !== '') {
|
if ($logFile !== '') {
|
||||||
$this->flowLogger = $this->logFactory->getCustomLogger($logFile);
|
$this->flowLogger = $this->logFactory->getCustomPsrLogger($logFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue