131 $logEndTime = intval(\
Bitrix\Main\
Config\Option::get(
'rest',
'log_end_time', 0));
132 if ($logEndTime < time())
137 $logOptions = @unserialize(
138 \
Bitrix\Main\
Config\Option::get(
'rest',
'log_filters',
''),
140 'allowed_classes' =>
false
143 if (!is_array($logOptions))
145 $logOptions = array();
149 isset($logOptions[
'client_id']) && $server->getClientId() !== $logOptions[
'client_id']
150 || isset($logOptions[
'password_id']) && $server->getPasswordId() !== $logOptions[
'password_id']
151 || isset($logOptions[
'scope']) && $server->getScope() !== $logOptions[
'scope']
152 || isset($logOptions[
'method']) && $server->getMethod() !== $logOptions[
'method']
153 || isset($logOptions[
'user_id']) && $USER->getId() !== $logOptions[
'user_id']
170 public static function addEntry(\CRestServer $server, $data)
172 $request = Main\Context::getCurrent()->getRequest();
173 static::filterResponseData($data);
176 'CLIENT_ID' => $server->getClientId(),
177 'PASSWORD_ID' => $server->getPasswordId(),
178 'SCOPE' => $server->getScope(),
179 'METHOD' => $server->getMethod(),
180 'REQUEST_METHOD' => $request->getRequestMethod(),
181 'REQUEST_URI' => $request->getRequestUri(),
182 'REQUEST_AUTH' => $server->getAuth(),
183 'REQUEST_DATA' => $server->getQuery(),
184 'RESPONSE_STATUS' => \CHTTP::getLastStatus(),
185 'RESPONSE_DATA' => $data,
226 $entity = static::getEntity();
227 $sqlTableName = static::getTableName();
228 $connection = $entity->getConnection();
230 $lastIdQuery = $connection->query(
"
234 $lastId = $lastIdQuery->fetch();
235 if ($lastId && $lastId[
'MID'])
240 $lastTimeQuery = $connection->query(
"
243 WHERE ID = $lastId[MID]
245 $lastTime = $lastTimeQuery->fetch();
246 if ($lastTime && $lastTime[
'TIMESTAMP_X'] < $date)
252 return "\\Bitrix\\Rest\\LogTable::cleanUpAgent();";