mw.eventLog.logEvent( 'CommunityPortal', { } );
will log with _ok: true despite obvious schema violations and the console warning (if ?debug=1):
Missing "token" property
This happens because the $.each( properties, ...) iterator in validate() in modules/ext.eventLogging.core.js does not propagate a return false from a property test; it halts iteration but the validate() function continues on and returns true.
I'm puzzled that the qunit tests of validate in http://localhost/wiki/index.php/Special:JavaScriptTest/qunit?module=ext.EventLogging all pass. They, e.g. assert.throws(... /Missing/), and even though validate() doesn't throw errors any more, they all pass.
BTW, it would be nice if the mw.eventLog.schemas.<Name>.logged included the system fields such as _ok.
Version: unspecified
Severity: minor