function &getWriterSingleton($name, $logger_name, $level = ABC_DEBUG) { static $instances; if (!isset($instances)) { $instances = array(); } $signature = serialize(array($name, $level)); if (!isset($instances[$signature])) { $instances[$signature] = DebugOut::Factory($name, $logger_name, $level); } return $instances[$signature]; }
function ExcelFileParser($logfile = "", $level = ABC_NO_LOG) { $this->dbglog =& DebugOut::getWriterSingleton($logfile, "", $level); $this->dbglog->info("Logger started"); }
function __construct($logfile = "", $level = ABC_NO_LOG) { $this->dbglog =& DebugOut::getWriterSingleton($logfile, "", $level); $this->dbglog->info("Logger запущен"); }