Lớp công cụ
LogService
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Tóm Tắt
Phương Pháp
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):() |
Sự Kiện
MessageOut(message: string,messageType: Enum.MessageType,context: Dictionary):RBXScriptSignal |
Tài Liệu Tham Khảo API
Phương Pháp
ClearOutput
LogService:ClearOutput():()
Lợi Nhuận
()
Error
Tham Số
| Giá Trị Mặc Định: "nil" |
Lợi Nhuận
()
Info
Tham Số
| Giá Trị Mặc Định: "nil" |
Lợi Nhuận
()
Log
Tham Số
| Giá Trị Mặc Định: "nil" |
Lợi Nhuận
()
Output
Tham Số
| Giá Trị Mặc Định: "nil" |
Lợi Nhuận
()
Warn
Tham Số
| Giá Trị Mặc Định: "nil" |
Lợi Nhuận
()
Sự Kiện
MessageOut
LogService.MessageOut(
Tham Số
Mẫu mã
LogService.MessageOut
local LogService = game:GetService("LogService")
local messageLabel = Instance.new("Message")
messageLabel.Parent = workspace
local function onMessageOut(message, messageType)
messageLabel.Text = "Tin nhắn là " .. message .. " và loại là " .. tostring(messageType)
end
LogService.MessageOut:Connect(onMessageOut)