/** * @param string $accessLogPath * @param string $requestLogPath * @param string $errorLogPath * @param string $debugLogPath * @return ShopgateLogger */ public static function getInstance($accessLogPath = null, $requestLogPath = null, $errorLogPath = null, $debugLogPath = null) { if (empty(self::$singleton)) { self::$singleton = new self(); // fall back to default log paths if none are specified if (empty($accessLogPath)) { $accessLogPath = SHOPGATE_BASE_DIR . DS . 'temp' . DS . 'logs' . DS . ShopgateConfigInterface::SHOPGATE_FILE_PREFIX . 'access.log'; } if (empty($requestLogPath)) { $requestLogPath = SHOPGATE_BASE_DIR . DS . 'temp' . DS . 'logs' . DS . ShopgateConfigInterface::SHOPGATE_FILE_PREFIX . 'request.log'; } if (empty($errorLogPath)) { $errorLogPath = SHOPGATE_BASE_DIR . DS . 'temp' . DS . 'logs' . DS . ShopgateConfigInterface::SHOPGATE_FILE_PREFIX . 'error.log'; } if (empty($debugLogPath)) { $debugLogPath = SHOPGATE_BASE_DIR . DS . 'temp' . DS . 'logs' . DS . ShopgateConfigInterface::SHOPGATE_FILE_PREFIX . 'debug.log'; } } // set log file paths if requested self::$singleton->setLogFilePaths($accessLogPath, $requestLogPath, $errorLogPath, $debugLogPath); return self::$singleton; }