Get the current logs.

@return array
191310
public function getLogs()
    {
        $realpath = (string) $this->getLogsRealpath();
        if (!$realpath) {
            return [];
        }

        $logs = trim($this->files->read($realpath));
        $logs = explode(PHP_EOL, $logs);

        return $logs;
    }
437579
public function current()
    {
        switch ($this->flags & 0x0F) {
            default:
            case self::CURRENT_ARRAY:
                return [$this->lhs->current(), $this->rhs->current()];
            case self::CURRENT_LHS:
                return $this->lhs->current();
            case self::CURRENT_RHS:
                return $this->rhs->current();
            case self::CURRENT_0:
                return null;
        }
    }
130348
protected function get_legacy_logdata() {
        $user = $this->get_record_snapshot('user', $this->objectid);
        return array(SITEID, 'user', 'delete', 'view.php?id=' . $user->id, $user->firstname . ' ' . $user->lastname);
    }
557504
protected function get_legacy_logdata() {
        if ($this->anonymous) {
            return null;
        } else {
            return array($this->courseid, 'feedback', 'submit', 'view.php?id=' . $this->other['cmid'],
                    $this->other['instanceid'], $this->other['cmid'], $this->relateduserid);
        }
    }
469108
protected function _getQueryLogs()
    {
        $sources = $this->_getSources();

        $queryLog = [];
        foreach ($sources as $source) {
            $logger = $this->_getSource($source)->getLogger();
            if (method_exists($logger, 'getLogs')) {
                $queryLog[$source] = $logger->getLogs();
            }
        }

        return $queryLog;
    }
799019
public function getLogFiles()
    {
        $files = new Finder();
        $files->files()->in(LOG_DIR)->name('*.log')->sortByModifiedTime();
        $logs = array();
        /** @var \SplFileInfo $file */
        foreach ($files as $file) {
            $size = $file->getSize() / 8 / 1024;
            $time = date('c', $file->getMTime());
            $dateTime = new \DateTime($time);
            if (!isset($logs[$dateTime->format('Y')])) {
                $logs[$dateTime->format('Y')] = [];
            }
            $logs[$dateTime->format('Y')][$dateTime->format('m')][$time] = [
                'filename' => $file->getFilename(),
                'size' => round($size, 3),
            ];
            krsort($logs[$dateTime->format('Y')][$dateTime->format('m')]);
            krsort($logs[$dateTime->format('Y')]);
        }
        return $logs;
    }
196991
public function getLogs($level = null)
	{
		// If no level was given, return all logs.
		if(is_null($level))
		{
			return $this->logs;
		}

		else
		{
			if(isset($this->logs[$level]))
			{
				return $this->logs[$level];
			}
		}

		// If the level doesn't exist, just return an empty array.
		//
		// @todo: check that the level exists, otherwise throw an exception. 
		return array();
	}
537250
public function readLog(): array
    {
        $logPath = $this->getLogPath();

        if (!file_exists($logPath)) {
            return [];
        }

        $data = @unserialize(file_get_contents($logPath));

        if (false === $data) {
            throw new \RuntimeException('Could not unserialize log file '.$logPath);
        }

        return (array) $data;
    }
1166683
public function getCurrentLogFilePath()
    {
        $rotateTimeMark = "";
        if ($this->rotateTimeFormat !== null) {
            $rotateTimeMark .= "-" . date($this->rotateTimeFormat);
        }

        if (is_callable($this->prefix)) {
            $prefix = call_user_func_array($this->prefix, []);
            // not check prefix here, let user ensure this correctness
        } else {
            $prefix = $this->prefix;
        }
        return $this->targetLogDir . '/log' . (empty($this->prefix) ? '' : "-" . $prefix) . $rotateTimeMark . '.log';
    }
237101
protected function get_legacy_logdata() {
        return array($this->courseid, 'scorm', 'userreportinteractions', 'report/userreportinteractions.php?id=' .
                $this->contextinstanceid . '&user=' . $this->relateduserid . '&attempt=' . $this->other['attemptid'],
                $this->other['instanceid'], $this->contextinstanceid);
    }
123427
public function getLogPath(): string
    {
        $path = $this->getRuntimePath() . DIRECTORY_SEPARATOR . 'logs';
        FileHelper::createDirectory($path);
        return $path;
    }
672366
protected function getLog()
    {
        if ($this->log == null) {
            $this->log = Tlog::getNewInstance();

            $logFilePath = $this->getLogFilePath();

            $this->log->setPrefix("#LEVEL: #DATE #HOUR: ");
            $this->log->setDestinations("\\Thelia\\Log\\Destination\\TlogDestinationFile");
            $this->log->setConfig("\\Thelia\\Log\\Destination\\TlogDestinationFile", 0, $logFilePath);
            $this->log->setLevel(Tlog::INFO);
        }

        return $this->log;
    }
101082
public function getLog()
    {
        if (null == $this->log) {
            $handler    = new StreamHandler($this->_getLogFileName(), Logger::INFO);
            $this->log  = new Logger('VagrantTransient');
            $this->log->pushHandler($handler);
        }
        return $this->log;
    }
326996
public function getHistory(): array
    {
        $history = [];
        foreach ($this->xml->History->children() as $logEntry) {
            $log = [];
            foreach ($logEntry as $key => $val) {
                $log[lcfirst($key)] = (string) $val;
            }
            $history[] = $log;
        }

        return $history;
    }
1253599
public function listLogChannels()
    {
        $uri = 'asterisk/logging';

        $response = $this->client->getEndpoint()->get($uri);

        $logChannels = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $logChannel) {
            $logChannels[] = new Module($logChannel);
        }

        return $logChannels;
    }
1184196
protected function getPagesBlog()
    {
        $conditions = $this->query_filter;

        $conditions['status'] = 1;
        $conditions['blog_post'] = 1;
        $conditions['limit'] = $this->data_limit;
        $conditions['store_id'] = $this->store_id;

        $list = (array) $this->page->getList($conditions);
        $this->preparePagesBlog($list);
        return $list;
    }
477963
def logs(self):
        """"""
        url = self._url + "/logs"
        return _log(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)