Skip to content

Game Logging

Registration point: GameSession#setGameLogHandler(GameLogHandler) (GameSession.java:862), registered once per session. The interface exposes a single entry point:

void onLog(String logJson);

logJson is a raw JSON string; parsing is the host’s responsibility. The fields documented in the javadoc are level (severity), key (event/metric name), value (value), and commonInfo (shared context) — do not assume a schema for fields beyond these four. onLog has no return value and no sink: it does not acknowledge back to content. Do not perform blocking I/O inside the callback; fan out to a backend asynchronously.

The interface header comment, verbatim: when not registered, log entries are written to Android logcat. This is the default destination, not an error state; implement this handler only if you need to route logs to your own analytics system.

The interface file describes the logs only as “JS-reported game log entries” and does not name a specific migo.* entry point — do not treat a concrete JS function name as part of the contract. Script-side behavior is unchanged regardless of whether a handler is registered.

Layer Status
Android Java facade ✓
C ABI none