Reproduction Steps
Currently, as of 3/24/22, the MessageOut event does not work correctly:
In a live server, the event is never fired, on the server or on the client.
In studio, it fires for the wrong contexts. Server and client get all messages from any context, when they should only get messages from their own context.
This bug makes it impossible to handle logging analytics, which is critical to maintaining a game.
Steps to reproduce:
Open the repro place file (attached below)
Run a playsolo test. Observe that warns are printed for every logged message
Comment out the server printing code on line 6
Run another playsolo test. Observe that the server script is still spitting warns for client messages
Uncomment the server printing code
Publish the place file to a cloud place.
Join the cloud place / live server. Observe that no warns are being logged at all.
Expected Behavior
It is expected that LogService.MessageOut fires on the server and on the client, regardless of whether or not the code is in a live server. It is also expected that LogService.MessageOut would respect the context it is being listened to in while in studio.
Actual Behavior LogService.MessageOut only works in studio, and does not respect server/client contexts.
Workaround
None
Issue Area: Engine Issue Type: Other Impact: High Frequency: Constantly Date First Experienced: 2022-03-24 00:03:00 (-04:00)
Neither of these are correct. You can reproduce the issue yourself - try printing a table with LogService.MessageOut listening for output. It does not print anything, yet other messages are printed just fine.
Again, simply not true. The repro file clearly indicates that printing does work.
I have verified that LogService.MessageOut works properly in live server and player client.We don’t allow print/warn/error in MessageOut as otherwise lots of messages will be printed out.
My test script increment a value in DataStore and I validated the value is correctly updated. For client script I simply update a local variable in the script and read it from the while loop.
It’s also worth noting that there is a bug in your client script. The MessageOut event is never registered.
However, I do agree that the behavior in Studio is weird, and our team will look into it more.
Update 2024/05: We released a patch for Studio local play mode and the issue with spammy Studio output should be fixed. Please file a new bug report if you observe any issues related to this. Thanks, all!