local function w(...)local w=topoRuntime.useFrameState()if w.logs==nil then return end local z={}for w=1,select("\035",...),1 do local y=select(w,...)if type(y)=="\116\097\098\108\101"then z[w]=format.formatTable(y)else z[w]=tostring(y)end end table.insert(w.logs,table.concat(z," "))if#w.logs>100 then table.remove(w.logs,1)end return w.deltaTime end return w
--[=[
	@within Matter

	:::info Topologically-aware function
	This function is only usable if called within the context of [`Loop:begin`](/api/Loop#begin).
	:::

	@param ... any

	Logs some text. Readable in the Matter debugger.
]=]
local function log(...)
	local state = topoRuntime.useFrameState()

	if state.logs == nil then
		return
	end

	local segments = {}

	for i = 1, select("#", ...) do
		local value = select(i, ...)

		if type(value) == "table" then
			segments[i] = format.formatTable(value)
		else
			segments[i] = tostring(value)
		end
	end

	table.insert(state.logs, table.concat(segments, " "))

	if #state.logs > 100 then
		table.remove(state.logs, 1)
	end

	return state.deltaTime
end

return log
