Logs
Lower-level packet/event log buffer per client. This is what the desktop Logs page tails — every TCP packet (incoming + outgoing), bot framework state changes, anti-AFK ticks, and your own print() output if the script is bound to a client.
Logger is a thin wrapper over the SAME ConsoleHandle as [Console] — :add() here shows up in the dashboard's Console pane and vice versa. The difference is the entries shape: Logger.entries is a flat string array (no timestamp / type metadata), while Console.entries carries the full row.
local client = getClient()
local logs = client:logger() -- or `getLogs()` for the active script's bound client
Constructors
getLogs()
| Field | Type |
|---|---|
| Signature | () → Logger |
| Returns | Logger — flat string view over the runtime's shared console |
| Async | no |
Same backing buffer as getConsole(), but the entries field is a flat list of message strings (no timestamp / type wrapper).
client:logger()
| Field | Type |
|---|---|
| Signature | (self: Client) → Logger |
| Returns | Logger — same buffer getLogs() reads from |
| Async | no |
Fields
logs.entries
| Field | Type |
|---|---|
| Signature | Logger.entries: {string} |
| Returns | {string} — 1-indexed list of message strings only |
Snapshot at access time — it doesn't update live. Re-read it whenever you need a fresh view.
Methods
logs:add(msg)
| Field | Type |
|---|---|
| Signature | (self: Logger, msg: string) → () |
| Returns | nothing |
| Async | no |
Push a single "info"-tagged entry. Useful for tagging important moments inline with the packet stream so forensics are easier later.
logs:add("--- starting auto-mine run ---")
client:warp("MINEWORLD")
sleep(2000)
logs:add("--- arrived, beginning loop ---")
In the desktop Logs page, the two add() lines appear interleaved with the TCP packets that ran between them — handy for "where did it actually go off the rails" forensics.
logs:clear()
| Field | Type |
|---|---|
| Signature | (self: Logger) → () |
| Returns | nothing |
| Async | no |
Drop everything in the shared console buffer. Wipes the Console pane too.
Iterate the snapshot
--!strict
local client = getClient()
if not client then return end
local logs = client:logger()
for i, line in ipairs(logs.entries) do
if line:find("KErr") then
print(("entry %d: server error → %s"):format(i, line))
end
end
When to use what
| Need | Use |
|---|---|
| Print to my script's console | print(...) |
| Capture errors from a script | Console entries[i].type == "error" |
| See every TCP packet | logs.entries |
| Tag a moment for later debug | logs:add("...") |
| Stream logs to a backend | logs.entries polled + http.post(...) |