/** * Reads it's configuration from the 'profilelog' * section of the configuration */ public function __construct() { if (self::$profilelogger != null) { return; } self::$profilelogger = new Zend_Log(); $configs = api_config::getInstance()->profilelog; if (is_null($configs) || count($configs) == 0) { self::$profilelogger->addWriter(new Zend_Log_Writer_Null()); return; } foreach ($configs as $cfg) { $log = $this->createLogObject($cfg['class'], $cfg); self::$profilelogger->addWriter($log); } }
function tearDown() { binarypool_profilelog::$profilelogger = null; }