local g=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local w=g:WaitForChild("\077\111\100\117\108\101\115")local v=require(w.src.utils.Print)local A=game:GetService("\082\117\110\083\101\114\118\105\099\101")local C={_infoLogEnabled=true;_infoLogAdvancedEnabled=false;_debugEnabled=A:IsStudio()}function C.setDebugLog(w,g)w._debugEnabled=g end function C.setInfoLog(w,g)w._infoLogEnabled=g end function C.setVerboseLog(w,g)w._infoLogAdvancedEnabled=g end function argsToString(...)local g=table.pack(...)local w=""for A=1,g.n,1 do if type(g[A])=="\116\097\098\108\101"then w=w..(v.prettyPrint(g[A]).."\046 ")else w=w..(tostring(g[A]).."\046 ")end end return w end function C.i(w,g,...)if not w._infoLogEnabled then return end local v="\073\110\102\111\058 "..g print(v,argsToString(...))end function C.w(w,g,...)local v="\087\097\114\110\105\110\103\058 "..g warn(v,argsToString(...))end function C.e(w,g,...)spawn(function()local w="\069\114\114\111\114\058 "..g error(w,0)end)end function C.d(w,g,...)if not w._debugEnabled then return end local v="\068\101\098\117\103\058 "..g print(v,argsToString(...))end function C.ii(w,g,...)if not w._infoLogAdvancedEnabled then return end local v="\086\101\114\098\111\115\101\058 "..g print(v,arg==nil and""or arg)end return C
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local Print = require(Modules.src.utils.Print)
local RunService = game:GetService('RunService')

local logger = {
	_infoLogEnabled = true,
	_infoLogAdvancedEnabled = false,
	_debugEnabled = RunService:IsStudio(),
}

function logger:setDebugLog(enabled)
	self._debugEnabled = enabled
end

function logger:setInfoLog(enabled)
	self._infoLogEnabled = enabled
end

function logger:setVerboseLog(enabled)
	self._infoLogAdvancedEnabled = enabled
end
function argsToString(...)
	local args = table.pack(...)

	local string = ''
	for i = 1, args.n do
		if type(args[i]) == 'table' then
			string = string .. Print.prettyPrint(args[i]) .. '. '
		else
			string = string .. tostring(args[i]) .. '. '
		end
	end
	return string
end

function logger:i(format, ...)
	if not self._infoLogEnabled then return end

	local m = 'Info: ' .. format
	print(m, argsToString(...))
end

function logger:w(format, ...)
	local m = 'Warning: ' .. format
	warn(m, argsToString(...))
end

function logger:e(format, ...)
	spawn(function()
		local m = 'Error: ' .. format
		error(m, 0)
	end)
end

function logger:d(format, ...)
	if not self._debugEnabled then return end

	local m = 'Debug: ' .. format

	print(m, argsToString(...))
end

function logger:ii(format, ...)
	if not self._infoLogAdvancedEnabled then return end

	local m = 'Verbose: ' .. format
	print(m, arg == nil and '' or arg)
end

return logger