local E=require(script.messages)local function x(x,I,...)local e=E[I]if e==nil then error(string.format("\n\091\068\101\108\118\101\114 \124 \073\110\116\101\114\110\097\108\093 \105\110\116\101\114\110\097\108 \108\111\103 \100\105\100\110\'\116 \102\105\110\100 \116\104\101 \109\101\115\115\097\103\101 \097\115\115\111\105\099\097\116\101\100 \119\105\116\104 \037\115",I))end local q=string.format(e,...)x("\n\091\068\101\108\118\101\114\093 "..(q..("\n \105\100\058 \037\115"):format(I)))end local I={}function I.logError(E,...)x(error,E,...)end function I.logErrorNonBlocking(E,...)task.spawn(function(E,...)x(error,E,...)end,E,...)end function I.logWarning(E,...)x(warn,E,...)end return I
local messages = require(script.messages)

local function log(loggerFunc, id, ...)
	local chosenMsg = messages[id]

	if chosenMsg == nil then
		error(string.format("\n[Delver | Internal] internal log didn't find the message assoicated with %s", id))
	end

	local formatedLog = string.format(chosenMsg, ...)
	loggerFunc("\n[Delver] " .. formatedLog .. ("\n id: %s"):format(id))
end

local logger = {}

function logger.logError(id, ...)
	log(error, id, ...)
end

function logger.logErrorNonBlocking(id, ...)
	task.spawn(function(id, ...)
		log(error, id, ...)
	end, id, ...)
end

function logger.logWarning(id, ...)
	log(warn, id, ...)
end

return logger
