filter is a bitmask of log or event types, where it currently maps each bit to the corresponding enum ordinal position. A filter value of zero drops the subscription. The server only holds the mask and one closure for each, where the closure captures message traffic and filters by the mask, sending a single ws message for each match.