Event Logger

The Event Logger service purely handles receiving log messages over the network and writing them to disk in a JSON-like format, along with a timestamp of when the log event was received by the event logger.

This service is the only service that does not communicate over TCP and does not use the Donet protocol, but rather it simply sends a datagram over UDP with a blob that contains the log message, expected to be encoded in MessagePack.

These UDP packets are expected to contain one MsgPack map, like the following, represented in JSON:

{
   "type": "event type",
   "sender": "identity of sender",
   "x": "lorem ipsum",
}

Where map keys after ‘sender’ are simply payload from your program logic. The type and sender keys are simply convention, but you can send any kind of map with any kind of keys and the Event Logger will simply log it to disk.

Note

While the Donet protocol is little-endian, MessagePack encoding is in big-endian byte order. You should keep this in mind if you are writing your own MsgPack implementation or inspecting raw packets.

Historically, AI processes (which run the application/game logic) make direct connections to the event logger and send log messages directly to it, but by design there is a control message in the Donet protocol for sending logs to the cluster’s event logger service by having a Message Director receive this control message type and route the log message to the event logger for you. See CONTROL_LOG_MESSAGE (9014).