- improved ajax authentication check and "logout" notification | closed #198 - improved logging, added missing log file configuration to pathfinder.ini - added logging for "unauthorized" requests | closed #198 - updated js "jQuery" 1.11.3 -> 3.0.0 | #206 - updated js "datatables" plugin 1.10.7 -> 1.10.12 | #206 - updated js "mCustomScrollbar" 3.1.14 -> 3.1.4 | #206
32 lines
585 B
PHP
32 lines
585 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: exodus4d
|
|
* Date: 14.06.2015
|
|
* Time: 15:24
|
|
*/
|
|
|
|
namespace controller;
|
|
|
|
|
|
class LogController extends Controller {
|
|
|
|
|
|
/**
|
|
* get Logger instance
|
|
* @param string $type
|
|
* @return \Log|null
|
|
*/
|
|
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);
|
|
}
|
|
|
|
return $logger;
|
|
}
|
|
|
|
} |