Skip to main content

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()

FieldType
Signature() → Logger
ReturnsLogger — flat string view over the runtime's shared console
Asyncno

Same backing buffer as getConsole(), but the entries field is a flat list of message strings (no timestamp / type wrapper).

client:logger()

FieldType
Signature(self: Client) → Logger
ReturnsLogger — same buffer getLogs() reads from
Asyncno

Fields

logs.entries

FieldType
SignatureLogger.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)

FieldType
Signature(self: Logger, msg: string) → ()
Returnsnothing
Asyncno

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()

FieldType
Signature(self: Logger) → ()
Returnsnothing
Asyncno

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

NeedUse
Print to my script's consoleprint(...)
Capture errors from a scriptConsole entries[i].type == "error"
See every TCP packetlogs.entries
Tag a moment for later debuglogs:add("...")
Stream logs to a backendlogs.entries polled + http.post(...)