Manual:Logging table/fr

Chaque action journalisée dans MediaWiki est enregistrée dans la table logging. Les utilisateurs peuvent voir ces modifications sur Special:Log, sauf certains enregistrements restreints (comme Special:Log/suppress).

Le contenu de cette table est ce que vous voyez sur la page Special:Log. Par exemple :



log_id
Clé primaire de la table. est une clé étrangère qui pointe sur cette colonne.

log_type
Type d'action de journalisation, ou type de journal.

Vous pouvez filtrer sur certaines valeurs de ce type dans Special:Log.

Comparable à.

Les valeurs d'exemple de some Wikimedia wikis sont les suivantes (y compris les journaux dorénavant obsolètes et quelques extensions):


 * abusefilter
 * block
 * close
 * contentmodel
 * delete
 * gblblock
 * gblrights
 * globalauth
 * gwtoolset
 * import
 * liquidthreads
 * lock
 * managetags
 * massmessage
 * merge
 * move
 * mwoauthconsumer
 * newsletter
 * newusers
 * notifytranslators
 * pagelang
 * pagetranslation
 * patrol
 * protect
 * renameuser
 * review
 * rights
 * spamblacklist
 * tag
 * thanks
 * timedmediahandler
 * translationreview
 * upload
 * usermerge

log_action
Action réalisée. Il peut y avoir plusieurs actions possibles pour un type donné : par exemple, une entrée de type delete peut avoir l'action de supression (delete) ou de restitution (restore), etc. Comparable à. Voir aussi. Voir.

log_timestamp
Date à laquelle l'action a été réalisée, dans le format de référence horaire utilisé par MediaWiki partout dans la base de données: yyyymmddhhmmss ("14:18, 25 juin 2008" par exemple). Comparable à et. Si l'événement enregistré et un téléversement de fichier, ce champ n'est pas nécessairement le même que le généré par.

log_user
de l'utilisateur qui a réalisé l'action. C'est une référence dans la table (l'Id de l'utilisateur Jacksprat dans l'exemple). Comparable à et.

Deprecated in favor of log_actor.

log_user_text
de l'utilisateur qui a réalisé l'action, initialement prévu pour les utilisateurs anonymes, initialisable par maintenance/populateLogUsertext.php. Comparable à et.

Deprecated in favor of log_actor.

log_actor
This is a foreign key to in the  table, corresponding to the user (registered or anonymous) who performed the action.

log_namespace
espace de noms de la page concernée. Avec log_title, ceci est une référence dan sla table (Image:Climb.jpg de l'exemple). Comparable à.


 * Special:Renameuser avec log_type et log_action valant soit la chaîne vide, soit
 * Special:Userlogin avec log_type valant  et   par exemple

log_title
de la page concernée. Avec log_namespace, ils forment une référence dans la table. Comparable à

Le titre est aussi connu sous le nom de 'cible' de l'entrée de journal.

Pour les utilisateurs bloqués, ceci est le nom d'utilisateur de l'utilisateur bloqué.

log_page
The that this log action is about. Comparable à et. In the case of a page move, this is set to the page_id of the moved page (since ). Formerly, it was the page_id of the redirect, or 0 if the page was moved without creating a redirect.

log_comment
The comment given for the action; that is the upload comment for uploads, the deletion comment for deletions, etc. Comparable à et.


 * log_comment_id and the comment table should be used instead!

log_comment_id
This is a foreign key to in the  table.

log_params
Paramètres additionnels, vide habituellement. Dupliqué dans. log_params is usually serialized, but not always; sometimes, for historical reasons, fields for log_params are separated by a newline. Anyone creating a new log type should use the PHP serialization.

For user blocks, log_params contains the duration of the block and other data, in human readable form, e.g. "2 weeks nocreate,noautoblock,noemail". For page moves, it contains a serialized array of the prefixed page title the page was moved to (i.e. in FULLPAGENAME format) and the boolean value of. Voir pour d'autres exemples.

Depuis la version 1.19, les données de log_params sont dans un format différent. For instance, if you want to filter patrol/patrol log entries excluding autopatrol, pre-1.19 log entries need: log.log_params LIKE '%\n0' while entries added in 1.19 and further need (serialized PHP arrays): log.log_params LIKE '%"6::auto";i:0%'

Since, log_params is always serialized for newusers log too. An entry now looks like:

mysql> select log_params, log_action from logging where log_user = 4681690; +--++ +--++ +--++
 * log_params                      | log_action |
 * a:1:{s:9:"4::userid";i:4681690;} | autocreate |

alors qu'il ressemblait à :

mysql> select log_params, log_action from logging where log_user = 2298743; +++ +++ +++
 * log_params | log_action |
 * 2298743   | autocreate |

The numbers, e.g. the 4 in "4::userid", are used as the argument number for message keys (e.g. $1, $2,...). The numbering should start with number 4, as the first three parameters are hardcoded for every message. If there is no message key, then a number should not be used. Some data contained in log_params are also contained in to facilitate indexed queries. Log parameters are typically set using functions such as and.

log_deleted
Utilisé avec le système pour supprimer des entrées dans le journal. Ce champ est comparable à et à. Ceci est un champ de bits. Faites le total de ce qui suit pour déterminer ce qu'il représente


 * 1 Action supprimée
 * 2 Commentaire supprimé
 * 4 Utilisateur supprimé
 * 8 Dans le cas où l'information supprimée est restreinte. If this field is not set, then only deletedhistory right is needed, otherwise you need suppressrevision right. (On Wikimedia wikis, this corresponds to if admins can view the entry, or if only oversighters can)

For example, if the value is 6 (4+2), then the action would be visible, but the comment and user would not be unless you had deletedhistory rights.

Résumé du schéma
++-+--+-+++ ++-+--+-+++ ++-+--+-+++
 * Field         | Type                | Null | Key | Default        | Extra          |
 * log_id        | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type      | varbinary(32)       | NO   | MUL |                |                |
 * log_action    | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)          | NO   | MUL | 19700101000000 |                |
 * log_actor     | bigint(20) unsigned | NO   | MUL | NULL           |                |
 * log_namespace | int(11)             | NO   | MUL | 0              |                |
 * log_title     | varbinary(255)      | NO   |     |                |                |
 * log_page      | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment_id | bigint(20) unsigned | NO  |     | NULL           |                |
 * log_params    | blob                | NO   |     | NULL           |                |
 * log_deleted   | tinyint(3) unsigned | NO   |     | 0              |                |

++-+--+-+++ ++-+--+-+++ ++-+--+-+++
 * Field         | Type                | Null | Key | Default        | Extra          |
 * log_id        | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type      | varbinary(32)       | NO   | MUL |                |                |
 * log_action    | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)          | NO   | MUL | 19700101000000 |                |
 * log_user      | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_user_text | varbinary(255)      | NO   | MUL |                |                |
 * log_actor     | bigint(20) unsigned | NO   | MUL | 0              |                |
 * log_namespace | int(11)             | NO   | MUL | 0              |                |
 * log_title     | varbinary(255)      | NO   |     |                |                |
 * log_page      | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment_id | bigint(20) unsigned | NO  |     | NULL           |                |
 * log_params    | blob                | NO   |     | NULL           |                |
 * log_deleted   | tinyint(3) unsigned | NO   |     | 0              |                |

++-+--+-+++ ++-+--+-+++ ++-+--+-+++
 * Field         | Type                | Null | Key | Default        | Extra          |
 * log_id        | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type      | varbinary(32)       | NO   | MUL |                |                |
 * log_action    | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)          | NO   | MUL | 19700101000000 |                |
 * log_user      | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_user_text | varbinary(255)      | NO   | MUL |                |                |
 * log_actor     | bigint(20) unsigned | NO   | MUL | 0              |                |
 * log_namespace | int(11)             | NO   | MUL | 0              |                |
 * log_title     | varbinary(255)      | NO   |     |                |                |
 * log_page      | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment   | varbinary(767)      | NO   |     |                |                |
 * log_comment_id | bigint(20) unsigned | NO  |     | 0              |                |
 * log_params    | blob                | NO   |     | NULL           |                |
 * log_deleted   | tinyint(3) unsigned | NO   |     | 0              |                |

++-+--+-+++ ++-+--+-+++ ++-+--+-+++
 * Field         | Type                | Null | Key | Default        | Extra          |
 * log_id        | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type      | varbinary(32)       | NO   | MUL |                |                |
 * log_action    | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)          | NO   | MUL | 19700101000000 |                |
 * log_user      | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_user_text | varbinary(255)      | NO   | MUL |                |                |
 * log_namespace | int(11)             | NO   | MUL | 0              |                |
 * log_title     | varbinary(255)      | NO   |     |                |                |
 * log_page      | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment   | varbinary(767)      | NO   |     |                |                |
 * log_comment_id | bigint(20) unsigned | NO  |     | 0              |                |
 * log_params    | blob                | NO   |     | NULL           |                |
 * log_deleted   | tinyint(3) unsigned | NO   |     | 0              |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_id       | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type     | varbinary(32)       | NO   | MUL |                |                |
 * log_action   | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)         | NO   | MUL | 19700101000000 |                |
 * log_user     | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_user_text | varbinary(255)     | NO   | MUL |                |                |
 * log_namespace | int(11)            | NO   | MUL | 0              |                |
 * log_title    | varbinary(255)      | NO   |     |                |                |
 * log_page     | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment  | varbinary(767)      | NO   |     |                |                |
 * log_params   | blob                | NO   |     | NULL           |                |
 * log_deleted  | tinyint(3) unsigned | NO   |     | 0              |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_id       | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type     | varbinary(32)       | NO   | MUL |                |                |
 * log_action   | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)         | NO   | MUL | 19700101000000 |                |
 * log_user     | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_user_text | varbinary(255)     | NO   | MUL |                |                |
 * log_namespace | int(11)            | NO   | MUL | 0              |                |
 * log_title    | varbinary(255)      | NO   |     |                |                |
 * log_page     | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment  | varbinary(255)      | NO   |     |                |                |
 * log_params   | blob                | NO   |     | NULL           |                |
 * log_deleted  | tinyint(3) unsigned | NO   |     | 0              |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_id       | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type     | varbinary(32)       | NO   | MUL |                |                |
 * log_action   | varbinary(32)       | NO   |     |                |                |
 * log_timestamp | binary(14)         | NO   | MUL | 19700101000000 |                |
 * log_user     | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_user_text | varbinary(255)     | NO   |     |                |                |
 * log_namespace | int(11)            | NO   | MUL | 0              |                |
 * log_title    | varbinary(255)      | NO   |     |                |                |
 * log_page     | int(10) unsigned    | YES  | MUL | NULL           |                |
 * log_comment  | varbinary(255)      | NO   |     |                |                |
 * log_params   | blob                | NO   |     | NULL           |                |
 * log_deleted  | tinyint(3) unsigned | NO   |     | 0              |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_id       | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type     | varbinary(10)       | NO   | MUL |                |                |
 * log_action   | varbinary(10)       | NO   |     |                |                |
 * log_timestamp | binary(14)         | NO   | MUL | 19700101000000 |                |
 * log_user     | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_namespace | int(11)            | NO   | MUL | 0              |                |
 * log_title    | varbinary(255)      | NO   |     |                |                |
 * log_comment  | varbinary(255)      | NO   |     |                |                |
 * log_params   | blob                | NO   |     | NULL           |                |
 * log_deleted  | tinyint(3) unsigned | NO   |     | 0              |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_id       | int(10) unsigned    | NO   | PRI | NULL           | auto_increment |
 * log_type     | varbinary(10)       | NO   | MUL |                |                |
 * log_action   | varbinary(10)       | NO   |     |                |                |
 * log_timestamp | binary(14)         | NO   | MUL | 19700101000000 |                |
 * log_user     | int(10) unsigned    | NO   | MUL | 0              |                |
 * log_namespace | int(11)            | NO   | MUL | 0              |                |
 * log_title    | varbinary(255)      | NO   |     |                |                |
 * log_comment  | varbinary(255)      | NO   |     |                |                |
 * log_params   | blob                | NO   |     | NULL           |                |
 * log_deleted  | tinyint(3) unsigned | NO   |     | 0              |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_type     | char(10)            | NO   | MUL | NULL           |                |
 * log_action   | char(10)            | NO   |     | NULL           |                |
 * log_timestamp | char(14)           | NO   | MUL | 19700101000000 |                |
 * log_user     | int unsigned        | NO   | MUL | 0              |                |
 * log_namespace | int                | NO   | MUL | 0              |                |
 * log_title    | varchar(255) binary | NO   |     | NULL           |                |
 * log_comment  | varchar(255)        | NO   |     | NULL           |                |
 * log_params   | blob                | NO   |     | NULL           |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_type     | char(10)            | NO   | MUL | NULL           |                |
 * log_action   | char(10)            | NO   |     | NULL           |                |
 * log_timestamp | char(14)           | NO   |     | 19700101000000 |                |
 * log_user     | int unsigned        | NO   | MUL | 0              |                |
 * log_namespace | int(11)            | NO   | MUL | 0              |                |
 * log_title    | varchar(255) binary | NO   |     | NULL           |                |
 * log_comment  | varchar(255)        | NO   |     | NULL           |                |
 * log_params   | blob                | NO   |     | NULL           |                |

+---+-+--+-+++ +---+-+--+-+++ +---+-+--+-+++
 * Field        | Type                | Null | Key | Default        | Extra          |
 * log_type     | char(10)            | NO   | MUL | NULL           |                |
 * log_action   | char(10)            | NO   |     | NULL           |                |
 * log_timestamp | char(14)           | NO   |     | 19700101000000 |                |
 * log_user     | int unsigned        | NO   | MUL | 0              |                |
 * log_namespace | tinyint(?) unsigned | NO  | MUL | 0              |                |
 * log_title    | varchar(255) binary | NO   |     | NULL           |                |
 * log_comment  | varchar(255)        | NO   |     | NULL           |                |
 * log_params   | blob                | NO   |     | NULL           |                |

Voir aussi

 * m:Help:Special page#Logs