LogService doesn't work online

Describe the bug.
LogService.MessageOut isn’t firing online for clients.

Describe what you would normally expect to occur.
For it to work on the client as it does in studio

How often does the bug happen?
Every time

What are the steps that reproduce the bug?
Insert a LocalScript in StarterGui with the contents:

game:GetService("LogService").MessageOut:Connect(function(a,b,c)
	print'logservice:'
	print(a,b,c)
end)

print'test'

Then upload & test online and compare it to testing in studio.

Where does the bug happen?
Every place - here’s a repro logservice test - Roblox

Would a screenshot or video help describe it to someone? If so, post one.

studio:
image
vs online:
image

System specs:
Windows 10

When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.
Unsure

Anything else?
I am trying to use LogService.MessageOut to detect and log when a client has an infinite waitforchild issue or another yellow text warning, so I as the developer can fix the rare bugs as they pop up. ScriptContext.Error works for red text errors, but not for warnings.

One such rare bug is a 5%-chance, gamebreaking issue that breaks my vehicle controls and forces people to rejoin the game, often multiple times to get it to work. I’m trying to narrow it down with LogService but it’s frustrating that it doesn’t work online.

12 Likes

I’m trying to set up external error logging and I’m seeing the same issue still. Logging in studio is also different than online. But LogService from within a LocalScript doesn’t seem to be doing anything at all. I’m surprised this has been an issue for so long.

Is there any chance we could get more info on this or if it’s an issue that it could be fixed relatively soon? It’s very hard for developers to get client side error information currently. I can’t expect my users to take screenshots for me from the dev console each time they have an issue and sometimes issues are very difficult to reproduce.

3 Likes

I’m still experiencing the same issue a year on. LogService seems to be used in the GitHub version of the DeveloperConsole but we seem unable to access it’s functionality on a live server.

Is there any chance to enable this service for game-level code? If not, can the wiki for LogService, and MessageOut reflect it’s current limitations?

We are able to access it. You just aren’t able to call print inside of the MessageOut event. That’s why the wiki page uses the deprecated Messages to log instead of print.

Also, see this tweet

3 Likes

I’m currently making an in-game script executor and I need to make a custom output to show info in the best appearance (just look how loadstring and Lua VM logs errors). I cut the unnecessary information and print the error. In Studio everything worked fine, and I expected it to work in Roblox Player, but it didn’t. Is there any reason why its not working online?

This behavior should be documented.

2 Likes

I tried to build some error collecting telemetry and spent many hours trying to diagnose why callbacks connected to MessageOut only work sometimes. Turns out if you print from within your callback connected to MessageOut, your callback will silently hang forever at your print. If you put your print in task.defer, it works fine.

Documentation would be better than nothing, but why wouldn’t this work?