bug fixing minor improvements

This commit is contained in:
exodus4d
2015-07-31 15:54:10 +02:00
parent 9826be3275
commit 65cbc9440f
377 changed files with 6077 additions and 3136 deletions

View File

@@ -11,30 +11,22 @@ namespace controller;
class LogController extends Controller {
/**
* log types. The Value represents the log file name
* @var array
*/
protected static $logTypes = [
'debug' => 'debug'
];
/**
* get an singleton instance for a logger instance
* @param $loggerType
* @param $logFileName
* @return mixed
*/
public static function getLogger($loggerType){
public static function getLogger($logFileName){
$f3 = \Base::instance();
$hiveKey = 'LOGGER' . $loggerType;
$hiveKey = 'LOGGER' . $logFileName;
// check if log controller already exists
if( !$f3->exists($hiveKey) ){
// create new logger instance
$logFile = self::$logTypes[$loggerType] . '.log';
$logFile = $logFileName . '.log';
$f3->set($hiveKey, new \Log($logFile));
}