LogMessage=game.ServerScriptService.ServerConsole.LogMessage local Y={}function Y.new()local p={}p.Log={}p.IsErrorFree=true p.LogInfo=Y.LogInfo p.LogMessage=Y.LogMessage p.LogOutput=Y.LogOutput p.LogWarning=Y.LogWarning p.LogError=Y.LogError p.BulkLog=Y.BulkLog p.SendToServerLog=Y.SendToServerLog return p end function Y.LogMessage(r,Y,p)assert(typeof(Y)=="\115\116\114\105\110\103")assert(typeof(p)=="\069\110\117\109\073\116\101\109"and p.EnumType==Enum.MessageType)if p==Enum.MessageType.MessageError then r.IsErrorFree=false end table.insert(r.Log,{message=Y;messageType=p})end function Y.LogInfo(p,Y)return p:LogMessage(Y,Enum.MessageType.MessageInfo)end function Y.LogOutput(p,Y)return p:LogMessage(Y,Enum.MessageType.MessageOutput)end function Y.LogWarning(p,Y)return p:LogMessage(Y,Enum.MessageType.MessageWarning)end function Y.LogError(p,Y)return p:LogMessage(Y,Enum.MessageType.MessageError)end function Y.BulkLog(p,Y)for Y,r in ipairs(Y)do p:LogMessage(r.message,r.messageType)end end function Y.SendToServerLog(Y)for Y,p in ipairs(Y.Log)do LogMessage:Invoke(p.message,p.messageType)end end return Y


LogMessage = game.ServerScriptService.ServerConsole.LogMessage

local mod = {}

function mod.new()
	local self = {}
	
	self.Log = {}
	self.IsErrorFree = true
	
	self.LogInfo = mod.LogInfo
	self.LogMessage = mod.LogMessage
	self.LogOutput = mod.LogOutput
	self.LogWarning = mod.LogWarning
	self.LogError = mod.LogError
	self.BulkLog = mod.BulkLog
	self.SendToServerLog = mod.SendToServerLog
	
	return self
end

function mod:LogMessage(message, messageType)
	assert(typeof(message) == "string")
	assert(typeof(messageType) == "EnumItem" and messageType.EnumType == Enum.MessageType)
	
	if messageType == Enum.MessageType.MessageError then
		self.IsErrorFree = false
	end
	
	table.insert(self.Log, {message = message, messageType = messageType})
end
function mod:LogInfo(message)
	return self:LogMessage(message, Enum.MessageType.MessageInfo)
end
function mod:LogOutput(message)
	return self:LogMessage(message, Enum.MessageType.MessageOutput)
end
function mod:LogWarning(message)
	return self:LogMessage(message, Enum.MessageType.MessageWarning)
end
function mod:LogError(message)
	return self:LogMessage(message, Enum.MessageType.MessageError)
end
function mod:BulkLog(messageEntries)
	for i, entry in ipairs(messageEntries) do
		self:LogMessage(entry.message, entry.messageType)
	end
end
function mod:SendToServerLog()
	for i, entry in ipairs(self.Log) do
		LogMessage:Invoke(entry.message, entry.messageType)
	end
end

return mod
