I’m able to repro this but found that it just ignores prints from the event handler in a live game. The event is still fired. IIRC I saw in a release notes a while ago that printing was allowed from MessageOut where it wasn’t previously- maybe this is related to that change?
Ran into this today, works in Studio but not live.
local LogService = game:GetService('LogService')
local messageTypeMap = {
[Enum.MessageType.MessageWarning] = ' Warning:',
[Enum.MessageType.MessageError] = ' Error:',
[Enum.MessageType.MessageInfo] = ''
}
local function onMessageOut(message: string, messageType: Enum.MessageType, timestamp: number?)
if messageType == Enum.MessageType.MessageOutput then return end
timestamp = timestamp or workspace:GetServerTimeNow()
print(`{timestamp}{messageTypeMap[messageType]} {message}`)
end
LogService.MessageOut:Connect(onMessageOut)
for _, log in LogService:GetLogHistory() do onMessageOut(log.message, log.messageType, log.timestamp) end
It does, and mine actually does too, in a fresh place. I may have overlooked something, but it doesn’t matter much as prints/warns/errors from within the function aren’t of much use anyways. What’s important is that it does pick everything up.
Because of an NDA I cannot share further details about this place, I’m sorry. I will say that the place also uses ScriptContext.Error in another script, and that is the only somewhat related thing I can think of.
It is picking up everything, I might have worded it oddly.