public function init($options) { parent::init($options); self::$globalOptions = $this->pluginConf; $this->pluginInstance = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_PLUGIN_INSTANCE"], "AbstractLogDriver"); if ($this->pluginInstance != false) { AJXP_PluginsService::getInstance()->setPluginUniqueActiveForType("log", $this->pluginInstance->getName(), $this->pluginInstance); } self::$loggerInstance = $this->pluginInstance; }
/** * Initialise the driver. * * Gives the driver a chance to set up it's connection / file resource etc.. * * @param Array $options array of options specific to the logger driver. * @access public */ function init($options) { parent::init($options); require_once AJXP_BIN_FOLDER . "/dibi.compact.php"; $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
/** * Initialize the driver. * * Gives the driver a chance to set up it's connection / file resource etc.. * * @param Array $options array of options specific to the logger driver. * @access public */ public function init($options) { parent::init($options); $this->sqlDriver = AJXP_Utils::cleanDibiDriverParameters($options["SQL_DRIVER"]); try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } $this->queries = AJXP_Utils::loadSerialFile($this->getBaseDir() . "/queries.json", false, "json"); }
/** * Initialise the text log driver. * * Sets the user defined options. * Makes sure that the folder and file exist, and makes them if they don't. * * @param Array $options array of options specific to the logger driver. * @access public * @return null */ public function init($options) { parent::init($options); $this->severityDescription = 0; $this->stack = array(); $this->fileHandle = false; $this->storageDir = isset($this->options['LOG_PATH']) ? $this->options['LOG_PATH'] : ""; $this->storageDir = AJXP_VarsFilter::filter($this->storageDir); $this->storageDir = rtrim($this->storageDir) . "/"; $this->logFileName = isset($this->options['LOG_FILE_NAME']) ? $this->options['LOG_FILE_NAME'] : 'log_' . date('m-d-y') . '.txt'; $this->USER_GROUP_RIGHTS = isset($this->options['LOG_CHMOD']) ? $this->options['LOG_CHMOD'] : 0770; if (preg_match("/(.*)date\\('(.*)'\\)(.*)/i", $this->logFileName, $matches)) { $this->logFileName = $matches[1] . date($matches[2]) . $matches[3]; } $this->initStorage(); }