PHP logging

EventLogging::logEvent( 'CodeMirrorUsage', 21143799, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"CodeMirrorUsage": 21143799
			}
		}
	}
}

JavaScript logging

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

Schema:CodeMirrorUsage

From Meta, a Wikimedia project coordination wiki
Revision 21143799
Jump to navigation Jump to search
description"Tracks usage statistics for Extension:CodeMirror."
properties
editor
type"string"
enum
"wikitext-2017"
"wikitext"
requiredtrue
description"The editor interface through which the user is using syntax highlighting."
enabled
type"boolean"
requiredtrue
description"True if syntax highlighting is enabled."
toggled
type"boolean"
requiredtrue
description"True if the toggle was used to enable/disable syntax highlighting."
session_token
type"string"
requiredtrue
description"The user's session token."
user_id
type"integer"
requiredtrue
description"The user's id (0 if logged out)."
user_edit_count_bucket
type"string"
requiredfalse
description"Reduced granularity edit count, safe to keep in the sanitized stream. This is optional, and will not be present for anonymous users."
enum
"0 edits"
"1-4 edits"
"5-99 edits"
"100-999 edits"
"1000+ edits"
edit_start_ts_ms
type"integer"
requiredtrue
description"Timestamp when the editor was first launched."