@param LogConnectTool $log
@param array          $options

@return array
430786
public function serialize(LogConnectTool $log, array $options = [])
    {
        $serialized = [
            'id' => $log->getUuid(),
            'date' => $log->getConnectionDate()->format('Y-m-d\TH:i:s'),
            'duration' => $log->getDuration(),
            'user' => $this->serializer->serialize($log->getUser(), [Options::SERIALIZE_MINIMAL]),
            'tool' => $this->serializer->serialize($log->getTool(), [Options::SERIALIZE_MINIMAL]),
            'toolName' => $log->getToolName(),
            'originalToolName' => $log->getOrignalToolName(),
            'workspace' => $log->getWorkspace() ?
                $this->serializer->serialize($log->getWorkspace(), [Options::SERIALIZE_MINIMAL]) :
                null,
            'workspaceName' => $log->getWorkspaceName(),
        ];

        return $serialized;
    }
947341
protected function _format($log)
    {
        $replaced = [];

        $replaced[':date'] = date('Y-m-d\TH:i:s', $log->timestamp) . sprintf('.%03d', ($log->timestamp - (int)$log->timestamp) * 1000);
        $replaced[':client_ip'] = $log->client_ip ?: '-';
        $replaced[':request_id'] = $log->request_id ?: '-';
        $replaced[':request_id16'] = $log->request_id ? substr($log->request_id, 0, 16) : '-';
        $replaced[':category'] = $log->category;
        $replaced[':location'] = "$log->file:$log->line";
        $replaced[':level'] = strtoupper($log->level);
        if ($log->category === 'exception') {
            $replaced[':message'] = '';
            /** @noinspection SuspiciousAssignmentsInspection */
            $replaced[':message'] = preg_replace('#[\\r\\n]+#', '\0' . strtr($this->_format, $replaced), $log->message) . PHP_EOL;
        } else {
            $replaced[':message'] = $log->message . PHP_EOL;
        }

        return strtr($this->_format, $replaced);
    }
1313353
public function addLog(Log $log)
    {
        $log->setInstance($this);
        $this->getLogs()->add($log);
    }
830960
public function UpdateExclusion(\Google\Cloud\Logging\V2\UpdateExclusionRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.logging.v2.ConfigServiceV2/UpdateExclusion',
        $argument,
        ['\Google\Cloud\Logging\V2\LogExclusion', 'decode'],
        $metadata, $options);
    }
717036
public static function GetConnection ($options) {
		$connection_name = static::AdjustConnectionName($options);

		if (!isset(static::$_connectionList[$connection_name])) {
			static::_Connect($options);
		}
		return static::$_connectionList[$connection_name];
	}
809049
protected function addRequest(array $log)
    {
        if (isset($_SERVER['HTTP_HOST'])) {
            $log['request']['host'] = $_SERVER['HTTP_HOST'];
        }
        if (isset($_SERVER['REQUEST_URI'])) {
            $log['request']['uri'] = $_SERVER['REQUEST_URI'];
        }
        if (isset($_SERVER['REQUEST_METHOD'])) {
            $log['request']['method'] = $_SERVER['REQUEST_METHOD'];
        }
        if (isset($_POST) && ! empty($_POST)) {
            $log['request']['body'] = $_POST;

            return $log;
        }

        return $log;
    }
456289
public function listLog ( $options, $user_id )
	{
		
		 if (empty($options))
		{
			$optionsFlag=NULL;
			
		}
		else
		{
			$optionsFlag=1;
			
		}
	
		$sql = "BEGIN SP_LIST_LOG(:P_OPTION_FLAG, :P_USA_ID, :P_OSR_CONSUMER_KEY, :P_OCR_CONSUMER_KEY, :P_OST_TOKEN, :P_OCT_TOKEN, :P_ROWS, :P_RESULT); END;";

            // parse sql
            $stmt = oci_parse($this->conn, $sql) or die ('Can not parse query');

            // Bind In and Out Variables
            oci_bind_by_name($stmt, ':P_OPTION_FLAG', $optionsFlag, 255);
            oci_bind_by_name($stmt, ':P_USA_ID', $user_id, 40);
			oci_bind_by_name($stmt, ':P_OSR_CONSUMER_KEY', $options['osr_consumer_key'], 255);
            oci_bind_by_name($stmt, ':P_OCR_CONSUMER_KEY', $options['ocr_consumer_key'], 255);
			oci_bind_by_name($stmt, ':P_OST_TOKEN', $options['ost_token'], 255);
            oci_bind_by_name($stmt, ':P_OCT_TOKEN', $options['oct_token'], 255);
            oci_bind_by_name($stmt, ':P_RESULT', $result, 20);

            //Bind the ref cursor
            $p_row = oci_new_cursor($this->conn);
            oci_bind_by_name($stmt, ':P_ROWS', $p_row, -1, OCI_B_CURSOR);

            //Execute the statement
            oci_execute($stmt);

            // treat the ref cursor as a statement resource
            oci_execute($p_row, OCI_DEFAULT);
            oci_fetch_all($p_row, $rs, null, null, OCI_FETCHSTATEMENT_BY_ROW);

		return $rs;
	}
997883
public static function get_query_log($connection_name = self::DEFAULT_CONNECTION)
        {
            if (isset(self::$_query_log[$connection_name])) {
                return self::$_query_log[$connection_name];
            }

            return [];
        }
906162
protected function executeOperation(LdapOperationInterface $operation, LogOperation $log = null)
    {
        $lastServer = $this->connection->getServer();
        try {
            $this->connectIfNotBound($operation);
            $lastServer = $this->connection->getServer();
            $handler = $this->getOperationHandler($operation);
            $handler->setOperationDefaults($operation);
            $this->logStart($log);
            $this->invalidateCacheIfNeeded($operation);
            list($result, $usedCache, $cacheKey) = $this->getCacheOrHandlerResult($operation, $handler, $log);
            $this->cacheResultIfNeeded($operation, $result, $usedCache, $cacheKey);

            return $result;
        } catch (\Throwable $e) {
            $this->logExceptionAndThrow($e, $log);
        } catch (\Exception $e) {
            $this->logExceptionAndThrow($e, $log);
        } finally {
            $this->logEnd($log);
            // It would not have set controls or switched servers if the cache was used...
            if (isset($usedCache) && $usedCache === false) {
                $this->resetLdapControls($operation);
                $this->switchServerIfNeeded($this->connection->getServer(), $lastServer, $operation);
            }
            $this->dispatcher->dispatch(new LdapOperationEvent(Event::LDAP_OPERATION_EXECUTE_AFTER, $operation, $this->connection));
        }
    }
1052260
public function debugLog($log)
    {
        if (defined('DEBUG_MODE') and DEBUG_MODE == 1) {
            $log = 'DEBUG >>> ' . $log;
            echo $log . PHP_EOL . PHP_EOL;
        }

        return $this;
    }
32297
protected function parseLog($log)
    {
        preg_match_all(LogParser::getMatchString(), $log, $matches);
        $metaData = [];
        $numEntries = count($matches[1]);
        for ($i = 0; $i < $numEntries; $i++) {
            $hash = $matches[1][$i];
            $name = $matches[2][$i];
            $eMail = $matches[3][$i];
            $timeStamp = (int)$matches[4][$i];
            $message = $matches[5][$i];
            $metaData[] = new CommitMetadata($hash, $name, $eMail, $timeStamp, $message);
        }

        return $metaData;
    }
605177
public function extractMessages(array $log = null)
    {
        if (true === empty($log)) {
            return array();
        }

        $this->extractor->setMessageGroups($this->config['message_groups']);

        return $this->extractor->setLog($log)
            ->extract();
    }
1009503
public function getConnection(array $options = array()) {
        $conn =& $this->connection;
        $mutable = $this->getOption(xPDO::OPT_CONN_MUTABLE, $options, null);
        if (!($conn instanceof xPDOConnection) || ($mutable !== null && (($mutable == true && !$conn->isMutable()) || ($mutable == false && $conn->isMutable())))) {
            if (!empty($this->_connections)) {
                shuffle($this->_connections);
                $conn = reset($this->_connections);
                while ($conn) {
                    if ($mutable !== null && (($mutable == true && !$conn->isMutable()) || ($mutable == false && $conn->isMutable()))) {
                        $conn = next($this->_connections);
                        continue;
                    }
                    $this->connection =& $conn;
                    break;
                }
            } else {
                $this->log(xPDO::LOG_LEVEL_ERROR, "Could not get a valid xPDOConnection", '', __METHOD__, __FILE__, __LINE__);
            }
        }
        return $this->connection;
    }
855695
public static function Connect ($dsn, $options = []) {
		$dsn = is_array($dsn) ? $dsn : IniFile::GetConfig($dsn, array_keys(static::$_enableIniRuleList), $options);

		if (isset($dsn['password']) && isset($options['key'])) {
			$algorithm = isset($options['algorithm']) ? $options['algorithm'] : self::PASSWORD_HASH_ALGORITHM;
			$dsn['password'] = static::CreateSecurePassword($dsn['password'], $options['key'], $algorithm);
		}

		$dsn_options = [];
		foreach ($dsn['options'] ?? [] as $option) {
			$dsn_options[(int)$option['name']] = (int)$option['value'];
		}
		$dsn['options'] = $dsn_options;

		$dsn['schemas'] = $dsn['schemas'] ?? [];

		static::$_dsnList[static::AdjustConnectionName($options, $dsn)][static::AdjustPriority($options)][static::AdjustStackNumber($options)] = $dsn;
	}
938383
public function ListLogs(\Google\Cloud\Logging\V2\ListLogsRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.logging.v2.LoggingServiceV2/ListLogs',
        $argument,
        ['\Google\Cloud\Logging\V2\ListLogsResponse', 'decode'],
        $metadata, $options);
    }
691919
public function getSearchOptions($table, string $field, array $options = []) : array
    {
        $handler = self::getByTableField($table, $field, $options, $this->cakeView);

        return $handler->getSearchOptions($options);
    }
341618
protected function formatLog(array $log): array
    {
        foreach ($log as &$logItem) {
            if ($logItem['type'] === 'model' || $logItem['type'] === 'field') {
                $logItem['action'] = $logItem['item']['action'];
            }

            if ($logItem['type'] === 'field') {
                $logItem['field'] = $logItem['item']['field'];
            }

            $formattedItem = $this->formatItem($logItem['type'], $logItem['item']);
            unset($logItem['item']);
            $logItem += $formattedItem;

            if (!empty($logItem['message'])) {
                continue;
            }

            if (is_array($logItem['permissions']) && array_key_exists('no_bypass', $logItem['permissions'])) {
                $logItem['permissions']['NO_BYPASS'] = $logItem['permissions']['no_bypass'];
                unset($logItem['permissions']['no_bypass']);
            }

            $typeKeys = array_keys($this->lpProxy->getTypes());

            $logItem['permission_no_bypass_checks'] = array_reverse($this->getPermissionNoBypassChecks($logItem['permissions'], $logItem['context'], $typeKeys));
            if (count($logItem['permission_no_bypass_checks']) == 1 && !empty($logItem['permission_no_bypass_checks'][0]['error'])) {
                $logItem['message'] = $logItem['permission_no_bypass_checks'][0]['error'];
            }

            $logItem['bypassed_access'] = $this->getBypassedAccess($logItem['permissions'], $logItem['context']);

            $purePermissions = $logItem['permissions'];
            unset($purePermissions['NO_BYPASS']);

            $logItem['permission_checks'] = array_reverse($this->getPermissionChecks($purePermissions, $logItem['context'], $typeKeys));
            if (count($logItem['permission_checks']) == 1 && !empty($logItem['permission_checks'][0]['error'])) {
                $logItem['message'] = $logItem['permission_checks'][0]['error'];
            }

            unset($logItem['context']);
        }
        unset($logItem);

        return $log;
    }