PHP logging

EventLogging::logEvent( 'PrefUpdate', 5563398, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"PrefUpdate": 5563398
			}
		}
	}
}

JavaScript logging

mw.track( 'event.PrefUpdate', { /* ... */ } );

Schema:PrefUpdate

From Meta, a Wikimedia project coordination wiki
Revision 5563398
Jump to navigation Jump to search
description"Logs preference changes initiated by a registered user. Each event represents a change to a row in MediaWiki's user_properties table and logs whether the change is from or to a default value. See also Schema:EchoPrefUpdate."
properties
version
type"string"
requiredtrue
description"Current version of the log. Any change affecting the nature of the data collected in the log should be tracked by bumping the version number. The field is a string to capture minor version changes."
saveTimestamp
type"string"
requiredtrue
description"A timestamp representing when a set of updates is made. This field is useful for grouping pref updates into a single changeset."
userId
type"integer"
requiredtrue
description"user ID"
property
type"string"
requiredtrue
description"The name of the property that changed."
value
type"string"
requiredtrue
description"The new value that the property is set to, encoded as JSON. When a preference is reverted to system default (and the record removed from user_properties), the relevant default value will be logged in this field and isDefault set to true."
isDefault
type"boolean"
requiredtrue
description"True if the new value represents the current system default"