Page MenuHomePhabricator

MediaWiki-LogeventsComponent
ActivePublic

Details

Description

The logging feature keep a record of on-wiki user actions. This includes the Special:Log user interface, the Logevents API, the code for reading/writing this data, and the logging database schema.

This component is part of the core MediaWiki software.

See also:

For tasks about MediaWiki software monitoring with log messages (LoggerFactory, wfDebugLog, etc), see MediaWiki-Debug-Logger.

Parent project: MediaWiki-General

Recent Activity

Wed, Dec 10

Mr._Starfleet_Command added a comment to T395112: History merges appearing twice in non-page-specific log entry lists is confusing.

Instead of displaying just one of the two logs when viewing page-nonspecific log lists, it would make more sense to simply have history merges generate a single log entry that is associated with multiple pages simultaneously. No idea how challenging that would be technically, but it seems the better solution in theory, right?

Wed, Dec 10, 5:06 PM · MW-Interfaces-Team, MediaWiki-MergeHistory, MediaWiki-Logevents

Sun, Nov 30

A_smart_kitten added a comment to T411321: Move actions can be recorded multiple times in the logs.

Closed as a duplicate as (to me) it seems like the same as T395168, but feel free to reopen if it's different :)

Sun, Nov 30, 9:13 AM · MediaWiki-Logevents, MediaWiki-Page-rename
A_smart_kitten merged T411321: Move actions can be recorded multiple times in the logs into T395168: Duplicate log-events sometimes created for page moves.
Sun, Nov 30, 9:12 AM · MediaWiki-Logevents, MediaWiki-Page-rename
A_smart_kitten merged task T411321: Move actions can be recorded multiple times in the logs into T395168: Duplicate log-events sometimes created for page moves.
Sun, Nov 30, 9:12 AM · MediaWiki-Logevents, MediaWiki-Page-rename
neriah added projects to T411321: Move actions can be recorded multiple times in the logs: MediaWiki-Page-rename, MediaWiki-Logevents.
Sun, Nov 30, 9:00 AM · MediaWiki-Logevents, MediaWiki-Page-rename

Tue, Nov 25

Reedy added projects to T411019: Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/wiki/mediawiki/core/includes/Logging/LogPage.php on line 423: MW-1.43-release, MW-1.44-release, MW-1.45-release.
Tue, Nov 25, 2:18 PM · MW-1.45-release, MW-1.44-release, MW-1.43-release, Patch-For-Review, PHP 8.5 support, MediaWiki-Logevents
Reedy moved T411019: Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/wiki/mediawiki/core/includes/Logging/LogPage.php on line 423 from Backlog to MediaWiki core on the PHP 8.5 support board.
Tue, Nov 25, 2:18 PM · MW-1.45-release, MW-1.44-release, MW-1.43-release, Patch-For-Review, PHP 8.5 support, MediaWiki-Logevents
gerritbot added a project to T411019: Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/wiki/mediawiki/core/includes/Logging/LogPage.php on line 423: Patch-For-Review.
Tue, Nov 25, 2:16 PM · MW-1.45-release, MW-1.44-release, MW-1.43-release, Patch-For-Review, PHP 8.5 support, MediaWiki-Logevents
gerritbot added a comment to T411019: Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/wiki/mediawiki/core/includes/Logging/LogPage.php on line 423.

Change #1211135 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@master] LogPage: Set $type property to '' if null passed in constructor

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

Tue, Nov 25, 2:16 PM · MW-1.45-release, MW-1.44-release, MW-1.43-release, Patch-For-Review, PHP 8.5 support, MediaWiki-Logevents
Reedy created T411019: Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/wiki/mediawiki/core/includes/Logging/LogPage.php on line 423.
Tue, Nov 25, 2:03 PM · MW-1.45-release, MW-1.44-release, MW-1.43-release, Patch-For-Review, PHP 8.5 support, MediaWiki-Logevents
Maintenance_bot removed a project from T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000: Patch-For-Review.
Tue, Nov 25, 12:31 AM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error
matmarex closed T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000 as Resolved.
Tue, Nov 25, 12:23 AM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error
ReleaseTaggerBot added a project to T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000: MW-1.46-notes (1.46.0-wmf.4; 2025-11-25).
Tue, Nov 25, 12:01 AM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error

Mon, Nov 24

gerritbot added a comment to T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000.

Change #1206388 merged by jenkins-bot:

[mediawiki/core@master] Pager: Clamp date overflow to avoid invalid offset timestamp

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

Mon, Nov 24, 11:38 PM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error

Thu, Nov 20

Bugreporter2 updated the task description for T240065: Introduce redirect log.
Thu, Nov 20, 4:44 AM · MediaWiki-Redirects, MediaWiki-Logevents, MediaWiki-Page-editing

Nov 17 2025

aaron changed the subtype of T290220: Protection log api parameters should have formatted description from "Task" to "Feature Request".
Nov 17 2025, 6:04 PM · MediaWiki-Logevents, MW-Interfaces-Team, Patch-Needs-Improvement, User-DannyS712, MediaWiki-Action-API, MediaWiki-Page-protection
aaron changed the subtype of T290222: User rights log api parameters should have formatted descriptions of old and new groups from "Task" to "Feature Request".
Nov 17 2025, 6:04 PM · MediaWiki-Logevents, MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-User-management, MediaWiki-Action-API, User-DannyS712
BPirkle added a project to T290222: User rights log api parameters should have formatted descriptions of old and new groups: MediaWiki-Logevents.
Nov 17 2025, 5:59 PM · MediaWiki-Logevents, MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-User-management, MediaWiki-Action-API, User-DannyS712
BPirkle added a project to T290220: Protection log api parameters should have formatted description: MediaWiki-Logevents.
Nov 17 2025, 5:58 PM · MediaWiki-Logevents, MW-Interfaces-Team, Patch-Needs-Improvement, User-DannyS712, MediaWiki-Action-API, MediaWiki-Page-protection
gerritbot added a comment to T193890: Allow search with logid in list=logevents.

Change #926674 abandoned by SD0001:

[mediawiki/core@master] api: allow querying logevents by logid

Reason:

done in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1187014

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

Nov 17 2025, 4:17 PM · MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-Logevents, MediaWiki-Action-API
Dragoniez closed T193890: Allow search with logid in list=logevents as Resolved.
Nov 17 2025, 3:54 PM · MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-Logevents, MediaWiki-Action-API
Dragoniez added a comment to T193890: Allow search with logid in list=logevents.

Oh? I didn’t know this task ever existed but the module now has the leids parameter introduced by T309483.

Nov 17 2025, 3:51 PM · MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-Logevents, MediaWiki-Action-API
gerritbot added a project to T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000: Patch-For-Review.
Nov 17 2025, 2:46 PM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error
gerritbot added a comment to T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000.

Change #1206388 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/core@master] pager: Clamp date overflow to avoid invalid offset timestamp

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

Nov 17 2025, 2:46 PM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error
Ammarpad claimed T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000.
Nov 17 2025, 2:07 PM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error

Nov 16 2025

Maintenance_bot added a project to T193890: Allow search with logid in list=logevents: MW-Interfaces-Team.
Nov 16 2025, 3:30 AM · MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-Logevents, MediaWiki-Action-API
Pppery edited projects for T193890: Allow search with logid in list=logevents, added: Patch-Needs-Improvement; removed Patch-For-Review.
Nov 16 2025, 3:11 AM · MW-Interfaces-Team, Patch-Needs-Improvement, MediaWiki-Logevents, MediaWiki-Action-API

Nov 14 2025

Pppery edited projects for T152829: When displaying logs for a page, include move log entries that represent a move TO that title (not only FROM that title), added: Patch-Needs-Improvement; removed Patch-For-Review.
Nov 14 2025, 1:40 AM · Patch-Needs-Improvement, Community-Wishlist-Survey-2022, MediaWiki-Logevents

Nov 13 2025

thcipriani moved T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000 from Oct-Dec 2025 to Jul–Sep 2025 on the Wikimedia-production-error board.
Nov 13 2025, 4:39 PM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error
thcipriani moved T402541: Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 2021101515310101000000 from Untriaged to Oct-Dec 2025 on the Wikimedia-production-error board.
Nov 13 2025, 4:28 PM · MW-1.46-notes (1.46.0-wmf.4; 2025-11-25), MediaWiki-Logevents, MediaWiki-Page-history, Wikimedia-production-error
ArielGlenn added a comment to T304960: PHP Deprecated: Caller … ignored an error originally raised from IndexPager::buildQueryInfo (LogPager, SpecialLog) or ApiQueryUserContribs::execute.

Still seeing these on 1.46.0-wmf.2.

Nov 13 2025, 3:07 AM · MediaWiki-Logevents, Unstewarded-production-error, Wikimedia-production-error

Nov 12 2025

Marostegui moved T405476: list=logevents slow or times out for users with many log entries but no recent activity from Refine to Pending comment on the DBA board.
Nov 12 2025, 8:37 AM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents
Marostegui added a comment to T405476: list=logevents slow or times out for users with many log entries but no recent activity.

Even after refreshing the stats, the optimizer seems to be choosing the wrong plan. I've filed a MariaDB bug (https://jira.mariadb.org/browse/MDEV-38072) but I believe we should reconsider adding the ignore hint back to the code if this feature is important and worth the possible pain of maintaining it in code as I've mentioned at T405476#11363865

Nov 12 2025, 7:35 AM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents

Nov 11 2025

Marostegui added a comment to T405476: list=logevents slow or times out for users with many log entries but no recent activity.

Wow, the stats are so out of date, no wonder why the optimizer is going nuts - let's see how this works with a refresh on the stats. :

+---------------+------------+------------+---------------------+--------------+------------+-------------+-----------------------------------+
| database_name | table_name | index_name | last_update         | stat_name    | stat_value | sample_size | stat_description                  |
+---------------+------------+------------+---------------------+--------------+------------+-------------+-----------------------------------+
| enwiki        | logging    | log_times  | 2022-05-26 17:07:07 | n_diff_pfx01 |   87385704 |          20 | log_timestamp                     |
| enwiki        | logging    | log_times  | 2022-05-26 17:07:07 | n_diff_pfx02 |  112955046 |          20 | log_timestamp,log_id              |
| enwiki        | logging    | log_times  | 2022-05-26 17:07:07 | n_leaf_pages |     167888 |        NULL | Number of leaf pages in the index |
| enwiki        | logging    | log_times  | 2022-05-26 17:07:07 | size         |     192064 |        NULL | Number of pages in the index      |
+---------------+------------+------------+---------------------+--------------+------------+-------------+-----------------------------------+
4 rows in set (0.003 sec)
Nov 11 2025, 5:35 PM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents
Marostegui added a comment to T405476: list=logevents slow or times out for users with many log entries but no recent activity.

Yeah, that URL gives the timeout and the query is (this is MariaDB 10.11) - our current production version:

SELECT  log_id,log_type,log_action,log_timestamp,log_deleted  FROM `logging` JOIN `actor` ON ((actor_id=log_actor))   WHERE (log_type NOT IN ('spamblacklist','titleblacklist','urlshortener','abusefilterprivatedetails','abusefilterblockeddomainhit','abusefilter-protected-vars','oath','checkuser-temporary-account','checkuser-private-event','ipinfo','suppress')) AND actor_name = 'DGG' AND ((log_deleted & 4) != 4)  ORDER BY log_timestamp DESC,log_id DESC LIMIT 2
Nov 11 2025, 5:27 PM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents

Nov 7 2025

Pppery moved T160233: Enable administrators to update block logs from Unsorted to MediaWiki & Extensions on the Community-consensus-needed board.
Nov 7 2025, 4:35 PM · Product Safety and Integrity, Community-consensus-needed, Patch-Needs-Improvement, MediaWiki-Blocks, Platform Team Workboards (Clinic Duty Team), User-DannyS712, MediaWiki-Logevents, Community-Wishlist-Survey-2016

Nov 6 2025

Cryptic added a comment to T405476: list=logevents slow or times out for users with many log entries but no recent activity.

@Anomie gives a query against the real tables in T71222#742492, though that's now very out of date (actor table, at minimum).

Nov 6 2025, 5:49 PM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents
Marostegui merged task T407582: [d5ea073c-a68c-4f3a-9cea-dc371b1517fe] 2025-10-16 21:41:08: Fatal exception of type "Wikimedia\Rdbms\DBQueryTimeoutError" into Restricted Task.
Nov 6 2025, 8:47 AM · MediaWiki-Logevents, Wikimedia-Slow-DB-Query, Wikimedia-production-error, DBA
Marostegui added a comment to T405476: list=logevents slow or times out for users with many log entries but no recent activity.

I've tried a few times the URLs on the task description but they seem to work to me, any chances anyone has the query handy so I can test on the prompt?

Nov 6 2025, 8:46 AM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents
Marostegui moved T405476: list=logevents slow or times out for users with many log entries but no recent activity from Triage to Refine on the DBA board.
Nov 6 2025, 8:30 AM · mariadb-optimizer-bug, MW-Interfaces-Team, DBA, Wikimedia-Slow-DB-Query, MediaWiki-Action-API, MediaWiki-Logevents

Nov 5 2025

Aklapper changed the subtype of T409306: Add button to filter out creations from "Task" to "Feature Request".

@Draceane: Thanks for reporting this. For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests, and fill in all the sections in the template. Thanks.

Nov 5 2025, 3:37 PM · MediaWiki-Logevents
Draceane created T409306: Add button to filter out creations.
Nov 5 2025, 2:57 PM · MediaWiki-Logevents

Oct 28 2025

Maintenance_bot edited projects for T393902: Multiblocks: Display only active blocks on the top of blocked user's Special:Contributions page / when editing a blocked user's user [talk] page, added: User-notice-archive; removed User-notice.
Oct 28 2025, 5:31 PM · User-notice-archive, MW-1.45-notes (1.45.0-wmf.23; 2025-10-14), MediaWiki-Special-pages, Community-Tech, MediaWiki-Logevents, Multiblocks, Trust and Safety Product Team

Oct 24 2025

OKryva-WMF moved T148649: Display an entry for page in watchlist when page protection expired; Display an entry in user page when user blocking expired from Inbox to Triaged (backlog) on the Product Safety and Integrity board.
Oct 24 2025, 3:23 PM · Product Safety and Integrity, Moderator-Tools-Team, MediaWiki-Blocks, MediaWiki-Watchlist, MediaWiki-Page-protection, MediaWiki-Logevents
OKryva-WMF edited projects for T148649: Display an entry for page in watchlist when page protection expired; Display an entry in user page when user blocking expired, added: Product Safety and Integrity; removed Trust and Safety Product Team.
Oct 24 2025, 3:15 PM · Product Safety and Integrity, Moderator-Tools-Team, MediaWiki-Blocks, MediaWiki-Watchlist, MediaWiki-Page-protection, MediaWiki-Logevents

Oct 23 2025

dancy added a comment to T304960: PHP Deprecated: Caller … ignored an error originally raised from IndexPager::buildQueryInfo (LogPager, SpecialLog) or ApiQueryUserContribs::execute.

Adding a fresh stack trace here for searchability:

Oct 23 2025, 3:20 PM · MediaWiki-Logevents, Unstewarded-production-error, Wikimedia-production-error

Oct 21 2025

KStoller-WMF moved T345016: Generate only one log entry when a mentor is removed from the list from Backlog to Needs community feedback on the Community Feedback (Growth) board.
Oct 21 2025, 11:56 PM · Community Feedback (Growth), Growth-Team, GrowthExperiments-Mentorship, MediaWiki-Logevents
Ladsgroup added a comment to T407582: [d5ea073c-a68c-4f3a-9cea-dc371b1517fe] 2025-10-16 21:41:08: Fatal exception of type "Wikimedia\Rdbms\DBQueryTimeoutError".

What do we want to do with this task then?

Oct 21 2025, 12:04 PM · MediaWiki-Logevents, Wikimedia-Slow-DB-Query, Wikimedia-production-error, DBA
Marostegui moved T407582: [d5ea073c-a68c-4f3a-9cea-dc371b1517fe] 2025-10-16 21:41:08: Fatal exception of type "Wikimedia\Rdbms\DBQueryTimeoutError" from Triage to Refine on the DBA board.
Oct 21 2025, 11:36 AM · MediaWiki-Logevents, Wikimedia-Slow-DB-Query, Wikimedia-production-error, DBA
Marostegui added a comment to T407582: [d5ea073c-a68c-4f3a-9cea-dc371b1517fe] 2025-10-16 21:41:08: Fatal exception of type "Wikimedia\Rdbms\DBQueryTimeoutError".

What do we want to do with this task then?

Oct 21 2025, 11:35 AM · MediaWiki-Logevents, Wikimedia-Slow-DB-Query, Wikimedia-production-error, DBA