LogService

Show Deprecated
Not Creatable
Service

Important notes about this service: This service might have unexpected or unreliable behavior depending on how games and the game engine log things. Content might also be truncated. Don't rely on contents of events and messages emitted by this service for any important game logic.

A service that allows you to read outputted text.

Summary

Methods

  • Clears the Roblox Studio output window.

  • Returns a table of tables, each with the message string, message type, and timestamp of a message that the client displays in the output window.

Properties

Methods

ClearOutput

()

Returns

()

GetLogHistory


Returns

Events

MessageOut

Parameters

message: string
messageType: Enum.MessageType

Code Samples

LogService.MessageOut

local LogService = game:GetService("LogService")
local messageLabel = Instance.new("Message")
messageLabel.Parent = workspace
local function onMessageOut(message, messageType)
messageLabel.Text = "The message was " .. message .. " and the type was " .. tostring(messageType)
end
LogService.MessageOut:Connect(onMessageOut)