芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/cloud.pulsehost.co.uk/vendor/afterlogic/dav/lib/DAV/Logs/Plugin.php
server = $server; $this->server->on('afterResponse', array($this, 'afterResponse')); $this->server->on('exception', array($this, 'onException')); } /** * Returns a plugin name. * * Using this name other plugins will be able to access other plugins * using \Sabre\DAV\Server::getPlugin * * @return string */ public function getPluginName() { return 'logs'; } /** * This method is called before any HTTP method, but after authentication. * * @param string $sMethod * @param string $path * @throws \Sabre\DAV\Exception\NotAuthenticated * @return bool */ public function afterResponse(\Sabre\HTTP\RequestInterface $request, \Sabre\HTTP\ResponseInterface $response) { \Aurora\System\Api::Log($request->getMethod() . ' ' . $request->getPath(), \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); if ((bool) \Aurora\Modules\Dav\Module::getInstance()->getConfig('LogBody', false)) { \Aurora\System\Api::Log('OUT >>>>>>>>>>>>>>>>>>>>>>', \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); $rRequestBody = $request->getBodyAsStream(); \rewind($rRequestBody); $sRequestBody = stream_get_contents($rRequestBody); \rewind($rRequestBody); \Aurora\System\Api::LogObject($sRequestBody, \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); \Aurora\System\Api::Log('IN <<<<<<<<<<<<<<<<<<<<<<', \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); $rResponseBody = $response->getBodyAsStream(); \rewind($rResponseBody); $sResponseBody = stream_get_contents($rResponseBody); \Aurora\System\Api::LogObject($sResponseBody, \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); } \Aurora\System\Api::Log('', \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); } public function onException($oException) { \Aurora\System\Api::LogException($oException, \Aurora\System\Enums\LogLevel::Full, 'sabredav-'); } }