Current development on JAMWiki is primarily focused on maintenance rather than new features due to a lack of developer availability. If you are interested in working on JAMWiki please join the jamwiki-devel mailing list.

Tech:Mediawiki Logs

ktip.png This page (and all pages in the Tech: namespace) is a developer discussion about a feature that is either proposed for inclusion in JAMWiki or one that has already been implemented. This page is NOT documentation of JAMWiki functionality - for a list of documentation, see Category:JAMWiki.
Status of this feature: IMPLEMENTED. This functionality was included in JAMWiki 0.8.0.


Mediawiki offers a Special:Logs page that contains information about user registration, imports, user blocks, etc. JAMWiki should at a minimum offer log capability, and ideally offer all the features of Mediawiki's implementation including integration with Special:RecentChanges.

Logs will need to be stored in a separate table, and the jam_recent_change will likely also need to be modified to display log information. A schema for the new table will likely look something like the following:

    CREATE TABLE jam_log ( \
      virtual_wiki_id INTEGER NOT NULL, \
      wiki_user_id INTEGER, \
      display_name VARCHAR(200) NOT NULL, \
      topic_id INTEGER, \
      topic_version_id INTEGER, \
      log_type INTEGER NOT NULL, \
      log_comment VARCHAR(200), \
      log_params VARCHAR(500), \
      CONSTRAINT jam_f_log_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), \
      CONSTRAINT jam_f_log_topic_ver FOREIGN KEY (topic_version_id) REFERENCES jam_topic_version(topic_version_id), \
      CONSTRAINT jam_f_log_topic FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id), \
      CONSTRAINT jam_f_log_vwiki FOREIGN KEY (virtual_wiki_id) REFERENCES jam_virtual_wiki(virtual_wiki_id) \

All of these fields should be self-explanatory except for possibly log_params which would contain delimited parameters specific to each log type. For example, the move log might contain something like "original_topic_name|new_topic_name" so that the original and destination topics for the move are available for parsing into log messages, etc. This code is still a work-in-progress.



Update 14-August-2009[edit]

revision 2667 adds code to create the jam_log table and to populate it with a record after a move, import, deletion, file upload, or user account creation. The Special:Logs page does not yet exist, but I've got code for that working locally, it just needs a bit more cleanup. Additional TODO items include integrating with Special:RecentChanges, adding ability to populate/reload this table for existing installations, fixing some issues with import logging (it logs too many records), adding logging for permission changes, and fixing the formatting of log display & messages. I expect that most of this work should be done and committed in the next 1-2 weeks. -- Ryan • (comments) • 14-Aug-2009 08:11 PDT

revision 2668 adds the Special:Log page. Integration with the Special:RecentChanges page is still to-do. -- Ryan • (comments) • 15-Aug-2009 10:56 PDT
revision 2671 integrates the new log entries with Special:RecentChanges. Logging of imports still needs cleanup as that code is logging too many entries. I think that this code should be ready to push to at some point during the coming week, and hopefully I'll be able to put out the first 0.8.0 beta shortly after that. -- Ryan • (comments) • 16-Aug-2009 12:43 PDT
The new code is now running on Logging of imports and page moves has been cleaned up somewhat, although I'd still like to get this functionality a bit more polished before declaring it ready for a beta release. -- Ryan • (comments) • 24-Aug-2009 22:28 PDT

Update 02-October-2009[edit]

At this point I'm mostly happy with the state of the logging code and ready to push it out for wider beta testing. Special:Log provides an overview of the available functionality, and the code integrates fairly nicely with Special:RecentChanges. There may be a few odd corner-cases during mass reloads using the Special:Maintenance tools, but those can be fixed as they are found. -- Ryan • (comments) • 03-Oct-2009 10:56 PDT