Return legacy data for add_to_log().

@return array
342401
protected function get_legacy_logdata() {
        if (isset($this->legacylogdata)) {
            return $this->legacylogdata;
        }

        return array($this->courseid, 'tag', 'update', 'index.php?id='. $this->objectid, $this->other['name']);
    }
372585
public function get_legacy_logdata() {
        $hook = $mode = '';
        if (isset($this->other['hook'])) {
            $hook = $this->other['hook'];
        }
        if (isset($this->other['mode'])) {
            $mode = $this->other['mode'];
        }
        return array($this->courseid, 'glossary', 'delete entry',
            "view.php?id={$this->contextinstanceid}&amp;mode={$mode}&amp;hook={$hook}",
            $this->objectid, $this->contextinstanceid);
    }
312151
public function get_legacy_logdata() {
        $user = $this->get_record_snapshot('user', $this->relateduserid);
        $fullname = fullname($user);
        $info = $this->grade->grade_item->itemname . ': ' . $fullname;
        $url = '/report/grader/index.php?id=' . $this->courseid;

        return array($this->courseid, 'grade', 'update', $url, $info);
    }
1292943
protected function get_legacy_eventdata() {
        $legacyeventdata = $this->get_record_snapshot('user_enrolments', $this->objectid);
        $legacyeventdata->enrol = $this->other['enrol'];
        $legacyeventdata->courseid = $this->courseid;
        return $legacyeventdata;
    }
1249875
public function LogOptions() {
		if(!$this->isActive()) return null;
		$logs[] = array(
			'ButtonText' => 'Pipeline Log',
			'Link' => $this->Link()
		);

		if($this->PreviousSnapshotID > 0) {
			$logs[] = array(
				'ButtonText' => 'Snapshot Log',
				'Link' => $this->PreviousSnapshot()->Link()
			);
		}

		if($this->CurrentDeploymentID > 0) {
			$logs[] = array(
				'ButtonText' => 'Deployment Log',
				'Link' => $this->CurrentDeployment()->Link()
			);
		}

		// Get logs from rollback steps (only for RollbackSteps).
		$rollbackSteps = array($this->RollbackStep1(), $this->RollbackStep2());
		foreach ($rollbackSteps as $rollback) {
			if($rollback->exists() && $rollback->ClassName=='RollbackStep') {
				if($rollback->RollbackDeploymentID > 0) {
					$logs[] = array(
						'ButtonText' => 'Rollback Log',
						'Link' => $rollback->RollbackDeployment()->Link()
					);
				}

				if($rollback->RollbackDatabaseID > 0) {
					$logs[] = array(
						'ButtonText' => 'Rollback DB Log',
						'Link' => $rollback->RollbackDatabase()->Link()
					);
				}
			}
		}

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

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

        return $logs;
    }
805834
public function getLastLog()
    {
        $log = $this->createQueryBuilder()
                    ->select('l.*')
                    ->from($this->tableName, 'l')
                    ->orderBy('l.id', 'DESC')
                    ->setMaxResults(1)
                    ->execute()
                    ->fetch();
        
        if (false !== $log) {
            return new Log($log);
        }
    }
758017
public function getLogs(){
        $rest = $this->getService( self::API_VPN_CLIENT_LOGS);
        $rest->GET();

        return $rest->getResult();
    }
501609
protected function get_legacy_eventdata() {
        $eventdata = new \stdClass();
        $eventdata->groupid = $this->objectid;
        $eventdata->userid  = $this->relateduserid;
        return $eventdata;
    }
585791
protected function get_legacy_logdata() {
        $submission = $this->get_record_snapshot('assign_submission', $this->objectid);
        $this->set_legacy_logdata('submit for grading', $this->assign->format_submission_for_log($submission));
        return parent::get_legacy_logdata();
    }
508917
protected function get_legacy_eventdata() {
        global $USER;

        $workshop = $this->get_record_snapshot('workshop', $this->objectid);
        $course   = $this->get_record_snapshot('course', $this->courseid);
        $cm       = $this->get_record_snapshot('course_modules', $this->contextinstanceid);
        $workshop = new \workshop($workshop, $cm, $course);
        return (object)array('workshop' => $workshop, 'user' => $USER);
    }
1101595
public static function getTotals()
    {
        $totals = array();
        $lastLog = end(self::$stackLog);
        foreach (array('time', 'realmem' /* , 'emalloc' */) as $metric) {
            $totals[$metric] = $lastLog[$metric . '_end'] - self::$startValues[$metric];
        }
        return $totals;
    }
473737
protected function get_legacy_logdata() {
        if ($this->relateduserid == $this->userid) {
            $title = get_string('editsubmission', 'assign');
        } else {
            $user = $this->get_record_snapshot('user', $this->relateduserid);
            $title = get_string('editsubmissionother', 'assign', fullname($user));
        }
        $this->set_legacy_logdata('view submit assignment form', $title);
        return parent::get_legacy_logdata();
    }
1275796
protected function get_legacy_logdata() {
        $logurl = new \moodle_url('index.php', array('course' => $this->courseid, 'user' => $this->relateduserid));
        $logurl->set_anchor('note-' . $this->objectid);
        return array($this->courseid, 'notes', 'add', $logurl, 'add note');
    }
660403
public function getVersions()
    {
        $this->initLogTable();

        $query = $this->db->getQuery(true)
            ->select('version')
            ->from($this->db->quoteName($this->logTable))
            ->order('version ASC');

        return $this->db->setQuery($query)->loadColumn();
    }
1094677
public function getLastLoggedIn()
    {
        $lastTime = LoginAttempt::get()
            ->filter([
                'MemberID' => $this->owner->ID,
                'Status' => 'Success',
            ])
            ->sort('Created', 'DESC')
            ->first();

        if ($lastTime) {
            return $lastTime->dbObject('Created')->format(DBDatetime::ISO_DATETIME);
        }
        return _t(__CLASS__ . '.NEVER', 'Never');
    }
1076988
protected function get_legacy_logdata() {
        $params = array();
        foreach ($this->validparams as $param) {
            if (!empty($this->other[$param])) {
                $params[$param] = $this->other[$param];
            }
        }
        $url = new \moodle_url('index.php', $params);
        return array (SITEID, 'blog', 'view', $url->out(), 'view blog entry');
    }