概要
方法
ClearOutput():() |
Error(message: string,context: Dictionary):() |
Info(message: string,context: Dictionary):() |
Log(messageType: Enum.MessageType,message: string,context: Dictionary):() |
Output(message: string,context: Dictionary):() |
Warn(message: string,context: Dictionary):() |
活动
MessageOut(message: string,messageType: Enum.MessageType,context: Dictionary):RBXScriptSignal |
API 参考
方法
ClearOutput
LogService:ClearOutput():()
返回
()
Error
参数
| 默认值:"nil" |
返回
()
Info
参数
| 默认值:"nil" |
返回
()
Log
参数
| 默认值:"nil" |
返回
()
Output
参数
| 默认值:"nil" |
返回
()
Warn
参数
| 默认值:"nil" |
返回
()
活动
MessageOut
LogService.MessageOut(
参数
代码示例
日志服务.消息输出
local LogService = game:GetService("LogService")
local messageLabel = Instance.new("Message")
messageLabel.Parent = workspace
local function onMessageOut(message, messageType)
messageLabel.Text = "消息为 " .. message .. ",类型为 " .. tostring(messageType)
end
LogService.MessageOut:Connect(onMessageOut)