Manual:Log
Appearance
This is just a starting point to help developers and site admins find relevant information elsewhere on the wiki. For user-oriented documentation on logging, see Help:Log.
Logging can be extremely helpful for a variety of audiences (users, site admins, developers) and purposes (monitoring events, tracking errors, development, building statistics, etc.).
Action logs
[edit]A wiki action such as a page move, user block, file upload, etc., often triggers the creation of a log that is intended for the benefit of users and/or site admins.
- Such logs are stored in the The
loggingtable of the database. - If not restricted, these logs are typically made accessible on the wiki, e.g.
- on special pages, such as Special:Log - see Manual:Logging to Special:Log. Some logs may be published to watchlists and recent changes.
- over the API
- See also Manual:Log actions.
PHP
[edit]Most of the relevant PHP classes are in the folder /includes/logging/ (1.40, 1.39).
Hooks include :
- Manual:LogEventsListGetExtraInputsHook.php
- Manual:LogEventsListLineEndingHook.php
- Manual:LogEventsListShowLogExtractHook.php
- Manual:LogLineHook.php
- Manual:ManualLogEntryBeforePublishHook.php
Logging for development and administration
[edit]As a developer, you may want to keep logs for the purpose of debugging, testing or diagnostics. You may also want your users to be able to keep logs as an aid to debugging software.
- Manual:How to debug - offers general information for site admins and developers.
- Manual:Structured logging - offers information for developers.