Page MenuHomePhabricator

Deprecate and remove $wgAPIRequestLog
Closed, ResolvedPublic

Description

$wgAPIRequestLog predates standardized structured logging in MediaWiki, and is basically superseded by ApiMain::logRequest() which provides the api (space-separated) and api-request (structured context) channels.

Event Timeline

Krinkle subscribed.

Suggesting this as idea to consider for MWI team.

So this is asking to remove the code in ApiEntryPoint that ends up calling this:

             LegacyLogger::emit(
				implode(
					',',
					$items
				) . "\n",
				$apiRequestLog
			);

We have a mechanism now that will warn people when running the updater if they have outdated config variables. We can use that.

BPirkle triaged this task as Medium priority.Mar 28 2024, 3:33 PM
aaron changed the task status from Open to In Progress.Jun 24 2024, 3:46 PM
aaron moved this task from Backlog to In Progress on the MediaWiki-API-Platform-Team board.

Change #1049234 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] api: deprecate and deactivate $wgAPIRequestLog

https://gerrit.wikimedia.org/r/1049234

Change #1049234 merged by jenkins-bot:

[mediawiki/core@master] api: deprecate and deactivate $wgAPIRequestLog

https://gerrit.wikimedia.org/r/1049234

Bugreporter subscribed.

Reopen. It has not been removed yet.

Change #1189184 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Drop last traces of wgAPIRequestLog, ignored since 1.43

https://gerrit.wikimedia.org/r/1189184

Change #1189184 merged by jenkins-bot:

[mediawiki/core@master] Drop last traces of wgAPIRequestLog, ignored since 1.43

https://gerrit.wikimedia.org/r/1189184