function logInfoMetatable.__tostring(b)local E={"\076\111\103\073\110\102\111 \123"}local p=#b.errors local l=#b.warnings local m=#b.infos if(p+l)+m==0 then table.insert(E,"\t\040\110\111 \109\101\115\115\097\103\101\115\041")end if p>0 then table.insert(E,("\t\069\114\114\111\114\115 \040\037\100\041 \123"):format(p))table.insert(E,indentLines(b.errors,2))table.insert(E,"\t\125")end if l>0 then table.insert(E,("\t\087\097\114\110\105\110\103\115 \040\037\100\041 \123"):format(l))table.insert(E,indentLines(b.warnings,2))table.insert(E,"\t\125")end if m>0 then table.insert(E,("\t\073\110\102\111\115 \040\037\100\041 \123"):format(m))table.insert(E,indentLines(b.infos,2))table.insert(E,"\t\125")end table.insert(E,"\125")return table.concat(E,"\n")end local function b()local b={errors={};warnings={},infos={}}setmetatable(b,logInfoMetatable)return b end local E={}
--[[
	Automatic coercion to strings for LogInfo objects to enable debugging them
	more easily.
]]
function logInfoMetatable:__tostring()
	local outputBuffer = { "LogInfo {" }

	local errorCount = #self.errors
	local warningCount = #self.warnings
	local infosCount = #self.infos

	if errorCount + warningCount + infosCount == 0 then
		table.insert(outputBuffer, "\t(no messages)")
	end

	if errorCount > 0 then
		table.insert(outputBuffer, ("\tErrors (%d) {"):format(errorCount))
		table.insert(outputBuffer, indentLines(self.errors, 2))
		table.insert(outputBuffer, "\t}")
	end

	if warningCount > 0 then
		table.insert(outputBuffer, ("\tWarnings (%d) {"):format(warningCount))
		table.insert(outputBuffer, indentLines(self.warnings, 2))
		table.insert(outputBuffer, "\t}")
	end

	if infosCount > 0 then
		table.insert(outputBuffer, ("\tInfos (%d) {"):format(infosCount))
		table.insert(outputBuffer, indentLines(self.infos, 2))
		table.insert(outputBuffer, "\t}")
	end

	table.insert(outputBuffer, "}")

	return table.concat(outputBuffer, "\n")
end

local function createLogInfo()
	local logInfo = {
		errors = {},
		warnings = {},
		infos = {},
	}

	setmetatable(logInfo, logInfoMetatable)

	return logInfo
end

local Logging = {}
