PHP logging

EventLogging::logEvent( 'EventCapsule', 16479585, $event );

extension.json setup for JavaScript logging

{
	"EventLoggingSchemas": {
		"EventCapsule": 16479585
	}
}

JavaScript logging

mw.eventLog.logEvent( 'EventCapsule', { /* ... */ } );

Schema:EventCapsule

From Meta, a Wikimedia project coordination wiki
Revision 16479585
Jump to: navigation, search
description"A wrapper around event objects that encodes generic metadata"
properties
event
type"object"
description"The encapsulated event object"
requiredtrue
wiki
type"string"
description"$wgDBName (for example: 'enwiki')"
requiredtrue
webHost
type"string"
description"Request host. 'window.location.hostname' on client-side events; $_SERVER['HTTP_HOST'] on server."
schema
type"string"
description"Title of event schema"
requiredtrue
revision
type"integer"
description"Revision ID of event schema"
requiredtrue
topic
type"string"
description"The queue topic name this event belongs in"
recvFrom
type"string"
description"Hostname of server emitting the log line"
requiredtrue
timestamp
type"number"
format"YYYYMMDDHHMMSS"
description"UTC timestamp of event"
requiredtrue
seqId
type"integer"
description"Udp2log sequence ID"
uuid
type"string"
description"Unique event identifier"
format"uuid5-hex"
requiredtrue
userAgent
type"string"
description"User Agent from HTTP request"
requiredfalse
additionalPropertiesfalse