|
|
@ -12,24 +12,31 @@ abstract class Logger |
|
|
|
{ |
|
|
|
|
|
|
|
protected static $_instance = null; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* pid текущего процесса |
|
|
|
* @var string |
|
|
|
*/ |
|
|
|
protected $pid = ''; |
|
|
|
|
|
|
|
protected function __construct() {} |
|
|
|
protected function __construct() |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @static |
|
|
|
* @return Logger |
|
|
|
*/ |
|
|
|
public static function getInstance() |
|
|
|
{ |
|
|
|
if(static::$_instance === null) { |
|
|
|
if (static::$_instance === null) { |
|
|
|
//$class = get_called_class();
|
|
|
|
$class = Config::get('Logger')->logger; |
|
|
|
static::$_instance = new $class(); |
|
|
|
} |
|
|
|
return static::$_instance; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Вывод лога |
|
|
|
* @param string $message Сообщение |
|
|
@ -53,5 +60,4 @@ abstract class Logger |
|
|
|
} |
|
|
|
|
|
|
|
abstract protected function concreteLog($message); |
|
|
|
|
|
|
|
} |