forked from leftypol/leftypol
context.php: log error if log_system is erroneous
This commit is contained in:
parent
5b4d1b7f4c
commit
b2029d2533
1 changed files with 5 additions and 1 deletions
|
@ -51,8 +51,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;
|
||||
}
|
||||
},
|
||||
CacheDriver::class => function($c) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue