context.php: fix log init

This commit is contained in:
Zankaria 2024-12-11 15:18:26 +01:00
parent 6132084b4b
commit fe4813867b

View file

@ -40,9 +40,9 @@ function build_context(array $config): Context {
// Check 'syslog' for backwards compatibility. // Check 'syslog' for backwards compatibility.
if ((isset($config['syslog']) && $config['syslog']) || $backend === 'syslog') { if ((isset($config['syslog']) && $config['syslog']) || $backend === 'syslog') {
return new SyslogLogDriver($name, $level, $this->config['log_system']['syslog_stderr']); return new SyslogLogDriver($name, $level, $config['log_system']['syslog_stderr']);
} elseif ($backend === 'file') { } elseif ($backend === 'file') {
return new FileLogDriver($name, $level, $this->config['log_system']['file_path']); return new FileLogDriver($name, $level, $config['log_system']['file_path']);
} elseif ($backend === 'stderr') { } elseif ($backend === 'stderr') {
return new StderrLogDriver($name, $level); return new StderrLogDriver($name, $level);
} else { } else {