forked from GithubBackups/vichan
Merge pull request #914 from Zankaria/log-system-report
context.php: log error if log_system is erroneous
This commit is contained in:
commit
7678ab978b
@ -55,8 +55,12 @@ function build_context(array $config): Context {
|
||||
return new FileLogDriver($name, $level, $config['log_system']['file_path']);
|
||||
} elseif ($backend === 'stderr') {
|
||||
return new StderrLogDriver($name, $level);
|
||||
} else {
|
||||
} elseif ($backend === 'error_log') {
|
||||
return new ErrorLogLogDriver($name, $level);
|
||||
} else {
|
||||
$log_driver = new ErrorLogLogDriver($name, $level);
|
||||
$log_driver->log(LogDriver::ERROR, "Unknown 'log_system' value '$backend', using 'error_log' default");
|
||||
return $log_driver;
|
||||
}
|
||||
},
|
||||
HttpDriver::class => function($c) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user