replace add_to_log() statement.

@return array of parameters to be passed to legacy add_to_log() function.
541266
protected function get_legacy_logdata() {
        $url = new \moodle_url('report.php', array('id' => $this->contextinstanceid));
        return array($this->courseid, 'choice', 'report', $url->out(), $this->objectid, $this->contextinstanceid);
    }
1175532
protected function getLogEntries()
    {
        if ($this->option('paginate')) {
            $logs  = $this->reader->paginate($this->option('per-page'), $this->option('page'));
            $total = $logs->total();

            $this->line("You have total ".$total." log ".(($total > 1) ? 'entries' : 'entry').".");
            $this->line("You are viewing page ".$logs->currentPage()."/".$logs->lastPage()." as follow:\r\n");
        } else {
            $logs  = $this->reader->get();
            $total = $logs->count();

            $this->line("You have total ".$total." log ".(($total > 1) ? 'entries' : 'entry')." as follow:\r\n");
        }

        return $logs;
    }
1093318
protected function get_legacy_logdata() {
        if ($this->other['itemtype'] === 'course') {
            $url = 'tag/search.php?query=' . urlencode($this->other['tagrawname']);
            return array($this->courseid, 'coursetags', 'add', $url, 'Course tagged');
        }

        return null;
    }
1217451
protected function addLogHandlers()
    {
        if ($logger = Injector::inst()->get(LoggerInterface::class)) {
            if (Director::is_cli()) {
                $logger->pushHandler(new StreamHandler('php://stdout'));
                $logger->pushHandler(new StreamHandler('php://stderr', Logger::WARNING));
            } else {
                $logger->pushHandler(new PreformattedEchoHandler());
            }
        }
    }
1227799
protected function get_legacy_logdata() {
        if ($this->courseid == SITEID and !isloggedin()) {
            // We did not log frontpage access in older Moodle versions.
            return null;
        }

        // We keep compatibility with 2.7 and 2.8 other['coursesectionid'].
        if (isset($this->other['coursesectionnumber']) || isset($this->other['coursesectionid'])) {
            if (isset($this->other['coursesectionnumber'])) {
                $sectionnumber = $this->other['coursesectionnumber'];
            } else {
                $sectionnumber = $this->other['coursesectionid'];
            }
            return array($this->courseid, 'course', 'view section', 'view.php?id=' . $this->courseid . '&amp;section='
                    . $sectionnumber, $sectionnumber);
        }
        return array($this->courseid, 'course', 'view', 'view.php?id=' . $this->courseid, $this->courseid);
    }
1094742
public function getLog()
    {
        $log = [];
        foreach ($this->traces as $request => $traces) {
            $log[] = sprintf('%s: %s', $request, implode(', ', $traces));
        }

        return implode('; ', $log);
    }
923896
protected function get_legacy_logdata() {
        $attempt = $this->get_record_snapshot('quiz_attempts', $this->objectid);

        return array($this->courseid, 'quiz', 'attempt', 'review.php?attempt=' . $this->objectid,
            $attempt->quiz, $this->contextinstanceid);
    }
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);
    }
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);
	}
647558
protected function getCallback()
    {
        if (!array_key_exists($this->logName, self::$loggers)) {
            $c = new LoggingClient($this->getUnwrappedClientConfig());
            self::$loggers[$this->logName] = $c->logger($this->logName);
        }
        return [self::$loggers[$this->logName], $this->batchMethod];
    }
672904
protected function getUpgradeLogColumnNames() {
		$colNames = array();
		foreach( array('time','script filename','script file hash') as $attrib ) {
			$colNames[self::toLowerCamelCase($attrib)] = $this->toDbObjectName($attrib);
		}
		return $colNames;
	}
72317
public static function add_line(string $log) : string {
        if (empty(self::$taskloginfo)) {
            return $log;
        }

        if (empty(self::$fh)) {
            return $log;
        }

        if (self::is_current_output_buffer()) {
            fwrite(self::$fh, $log);
        }

        return $log;
    }
714672
protected function get_legacy_logdata() {
        $submission = $this->get_record_snapshot('assign_submission', $this->objectid);
        $user = $this->get_record_snapshot('user', $submission->userid);
        $logmessage = get_string('reverttodraftforstudent', 'assign', array('id' => $user->id, 'fullname' => fullname($user)));
        $this->set_legacy_logdata('revert submission to draft', $logmessage);
        return parent::get_legacy_logdata();
    }
440370
String constructLogMsg() {
    final StringBuilder msg = new StringBuilder();

    for (final Map.Entry<String, List<StackTraceElement>> e : paramToStackTrace.build().entries()) {
      msg.append("Parameter ").append(e.getKey()).append(" accessed at \n");
      msg.append(FluentIterable.from(e.getValue())
          // but exclude code in Parameters itself
          .filter(not(IS_THIS_CLASS))
          .filter(not(IS_PARAMETERS_ITSELF))
          .filter(not(IS_THREAD_CLASS))
          .join(StringUtils.unixNewlineJoiner()));
      msg.append("\n\n");
    }
    return msg.toString();
  }
526846
protected function get_legacy_logdata() {
        if (!empty($this->legacylogdata)) {
            return $this->legacylogdata;
        }

        return array(SITEID, 'category', 'update', 'editcategory.php?id=' . $this->objectid, $this->objectid);
    }
419907
protected function get_legacy_logdata() {
        $lesson = $this->get_record_snapshot('lesson', $this->other['lessonid']);
        return array($this->courseid, 'lesson', 'update grade', 'essay.php?id=' .
                $this->contextinstanceid, $lesson->name, $this->contextinstanceid);
    }
218677
protected function get_legacy_logdata() {
        if (!empty($this->other['wid'])) {
            return(array($this->courseid, 'wiki', 'view',
                'view.php?wid=' . $this->data['other']['wid'] . '&title=' . $this->data['other']['title'],
                $this->data['other']['wid'], $this->contextinstanceid));
        } else if (!empty($this->other['prettyview'])) {
            return(array($this->courseid, 'wiki', 'view',
                'prettyview.php?pageid=' . $this->objectid, $this->objectid, $this->contextinstanceid));
        } else {
            return(array($this->courseid, 'wiki', 'view',
                'view.php?pageid=' . $this->objectid, $this->objectid, $this->contextinstanceid));
        }
    }