From MediaWiki.org
Jump to navigation Jump to search

Get a list of all logged events, à la Special:Log. This module cannot be used as a generator.


  • leprop: Which properties to get. (Default: ids|title|type|user|timestamp|comment|details)
    • ids: Page ID of the page in question and log ID
    • title: Title of the page in question
    • type: Type of log entry
    • user: User responsible for the log entry
    • userid: The user ID who was responsible for the log event. When specified for account creation events, the userid of the creating user is returned. When absent, the userid returned is that of the created account (see bugzilla:71020).
    • timestamp: Time and date the log entry was created
    • comment: Log comment
    • parsedcomment: The parsed comment of the event
    • details: Extra information (not present for all log types)
    • tags: List tags for the event
  • letype: Only list log entries of this type. Note that extensions may add other log types.
    • block
    • delete
    • import
    • merge
    • move
    • newusers
    • patrol
    • protect
    • stable
    • rights
    • upload
  • leaction: Filter log actions to only this type. Overrides letype even if the action isn't related to letype. 1.17+
    • block/block
    • block/reblock
    • block/unblock
    • delete/delete
    • delete/event
    • delete/restore
    • delete/revision
    • import/interwiki
    • import/upload
    • merge/merge
    • move/move_redir
    • move/move
    • newusers/autocreate
    • newusers/create2
    • newusers/create
    • newusers/newusers
    • patrol/patrol
    • protect/modify
    • protect/move_prot
    • protect/protect
    • protect/unprotect
    • rights/autopromote
    • rights/erevoke
    • rights/rights
    • upload/overwrite
    • upload/revert
    • upload/upload
  • leuser: Only list log entries made by this user
  • letitle: Only list log entries related to this title
  • lestart: The timestamp to start listing from
  • leend: The timestamp to end listing at
  • ledir: Direction to list in. (Default: older)
    • older: List newest log entries first. Note: lestart has to be later than leend.
    • newer: List oldest log entries first. Note: lestart has to be earlier than leend.
  • lelimit: Maximum number of log entries to list No more than 500 (5000 for bots) allowed. (Default: 10)
  • leprefix: Filter entries that start with this prefix. Disabled in Miser Mode
  • letag: Only list event entries tagged with this tag


List the 3 most recent page moves

List the 3 most recent uploads

Error Codes[edit]

Code Info
leparam_user User name username not found
leparam_title Bad title value 'title'
This happens when you set letitle to an invalid title.

list=logevents (le)

(main | query | logevents)

Get events from logs.


Which properties to get:

Adds the ID of the log event.
Adds the title of the page for the log event.
Adds the type of log event.
Adds the user responsible for the log event.
Adds the user ID who was responsible for the log event.
Adds the timestamp for the log event.
Adds the comment of the log event.
Adds the parsed comment of the log event.
Lists additional details about the log event.
Lists tags for the log event.
Values (separate with | or alternative): ids, title, type, user, userid, timestamp, comment, parsedcomment, details, tags
Default: ids|title|type|user|timestamp|comment|details

Filter log entries to only this type.

One of the following values: Can be empty, or spamblacklist, titleblacklist, timedmediahandler, gblblock, renameuser, globalauth, gblrights, gblrename, abusefilter, abusefilterprivatedetails, liquidthreads, massmessage, translationreview, notifytranslators, thanks, usermerge, oath, newsletter, block, protect, rights, delete, upload, move, import, patrol, merge, suppress, tag, managetags, contentmodel, pagetranslation, newusers, create, pagelang

Filter log actions to only this action. Overrides letype. In the list of possible values, values with the asterisk wildcard such as action/* can have different strings after the slash (/).

One of the following values: abusefilter/create, abusefilter/hit, abusefilter/modify, abusefilterprivatedetails/access, block/block, block/reblock, block/unblock, contentmodel/change, contentmodel/new, create/create, delete/delete, delete/delete_redir, delete/event, delete/flow-delete-post, delete/flow-delete-topic, delete/flow-restore-post, delete/flow-restore-topic, delete/restore, delete/revision, gblblock/dwhitelist, gblblock/gblock, gblblock/gblock2, gblblock/gunblock, gblblock/modify, gblblock/whitelist, gblrename/merge, gblrename/promote, gblrename/rename, gblrights/deleteset, gblrights/groupperms, gblrights/groupprms2, gblrights/groupprms3, gblrights/grouprename, gblrights/newset, gblrights/setchange, gblrights/setnewtype, gblrights/setrename, gblrights/usergroups, globalauth/delete, globalauth/hide, globalauth/lock, globalauth/lockandhid, globalauth/setstatus, globalauth/unhide, globalauth/unlock, import/interwiki, import/lqt-to-flow-topic, import/upload, interwiki/*, liquidthreads/merge, liquidthreads/move, liquidthreads/resort, liquidthreads/signatureedit, liquidthreads/split, liquidthreads/subjectedit, lock/flow-lock-topic, lock/flow-restore-topic, managetags/activate, managetags/create, managetags/deactivate, managetags/delete, massmessage/*, massmessage/failure, massmessage/send, massmessage/skipbadns, massmessage/skipnouser, massmessage/skipoptout, merge/merge, move/move, move/move_redir, newsletter/*, newusers/autocreate, newusers/byemail, newusers/create, newusers/create2, newusers/newusers, notifytranslators/sent, oath/*, pagelang/pagelang, pagetranslation/associate, pagetranslation/deletefnok, pagetranslation/deletefok, pagetranslation/deletelnok, pagetranslation/deletelok, pagetranslation/discourage, pagetranslation/dissociate, pagetranslation/encourage, pagetranslation/mark, pagetranslation/movenok, pagetranslation/moveok, pagetranslation/prioritylanguages, pagetranslation/unmark, patrol/autopatrol, patrol/patrol, protect/modify, protect/move_prot, protect/protect, protect/unprotect, renameuser/renameuser, rights/autopromote, rights/rights, spamblacklist/*, suppress/block, suppress/cadelete, suppress/delete, suppress/event, suppress/flow-restore-post, suppress/flow-restore-topic, suppress/flow-suppress-post, suppress/flow-suppress-topic, suppress/hide-afl, suppress/reblock, suppress/revision, suppress/setstatus, suppress/unhide-afl, tag/update, thanks/*, timedmediahandler/resettranscode, titleblacklist/*, translationreview/group, translationreview/message, upload/overwrite, upload/revert, upload/upload, usermerge/*

The timestamp to start enumerating from.

Type: timestamp (allowed formats)

The timestamp to end enumerating.

Type: timestamp (allowed formats)

In which direction to enumerate:

List oldest first. Note: lestart has to be before leend.
List newest first (default). Note: lestart has to be later than leend.
One of the following values: newer, older
Default: older

Filter entries to those made by the given user.

Type: user name

Filter entries to those related to a page.


Filter entries to those in the given namespace.

One of the following values: -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 90, 91, 92, 93, 100, 101, 102, 103, 104, 105, 106, 107, 486, 487, 828, 829, 1198, 1199, 2300, 2301, 2302, 2303, 2600, 5500, 5501

Disabled due to miser mode.


Only list event entries tagged with this tag.


How many total event entries to return.

No more than 500 (5,000 for bots) allowed.
Type: integer or max
Default: 10

When more results are available, use this to continue.


For autoblock unblock entries, the page title is shown as "User:$blockid". This is indeed not a User page, just the way it is stored. As per task T19781


It returns a list of items, each item being a log item.

Items can contain these properties, from the logging table:

  • logid: Content of the log_id field.
  • ns: Content of the log_namespace field.
  • title: Prefixed title from the log_namespace and log_title fields.
  • pageid: Page id corresponding to the current page defined by the combination of the log_namespace and log_title fields. It represents the current page id, not the page id at the time the log was stored.
  • logpage: Content of the log_page field. It represents the page id at the time the log was stored.
  • type: Content of the log_type field.
  • action: Content of the log_action field.
  • userid: Content of the log_user field.
  • user: Content of the log_user_text field.
  • timestamp: Content of the log_timestamp field formatted in ISO 8601 format.
  • comment: Content of the log_comment field.
  • actionhidden: Boolean indicating the title was hidden. ns and title will be absent if the user has no sufficient rights to view deleted log entries.
  • commenthidden: Boolean indicating the comment was hidden. comment will be absent if the user has no sufficient rights to view deleted log entries.
  • userhidden: Boolean indicating the user was hidden. user and userid will be absent if the user has no sufficient rights to view deleted log entries.
  • suppressed: Boolean indicating details were supressed. Only users with the suppressrevision can view them.
  • params: Prettified content of the log_params field in array format:
    • Legacy parameters will contain numeric keys, where each key is a line.
    • Other entries are formatted according to the LogFormatter class:
      • In general, parameter names in "4::paramname" format are output as "paramname", stripping the index and type and formatting the value accordingly.
      • If the parameter is a title, it's split in 2 parameters: paramname_ns (contains the namespace number) and paramname_title (contains the whole title, namespace included).
    • Before MediaWiki 1.25:
      • Parameters weren't in the params property, but in a property with the same name as the type value.
      • Some log types had different parameter names.
      • Legacy parameters were in numeric keys directly inside the log entry and not inside the params property.

Here are some examples of child elements that reveal log parameters:


<block duration="3 days" expiry="2014-09-18T20:35:54Z"><flags><f>nocreate</f></flags></params>


<move target_ns="0" target_title="Foo" suppressredirect="" />


<params curid="12" previd="0" auto="1" />


<params><newgroups><g>sysop</g></newgroups><oldgroups /></params>

See also[edit]

Other languages: English  • polski