- fixed bug with non existing log file names

This commit is contained in:
Exodus4D
2017-01-12 19:39:09 +01:00
parent 81e49af22f
commit a0584ca76e

View File

@@ -138,11 +138,10 @@ class LogController extends \Prefab {
public static function getLogger($type){
$f3 = \Base::instance();
$logFiles = $f3->get('PATHFINDER.LOGFILES');
$logger = null;
if( !empty($logFiles[$type]) ){
$logFile = $logFiles[$type] . '.log';
$logger = new \Log($logFile);
}
$logFileName = empty($logFiles[$type]) ? 'error' : $logFiles[$type];
$logFile = $logFileName . '.log';
$logger = new \Log($logFile);
return $logger;
}