32 lines
642 B
Lua
32 lines
642 B
Lua
local log = {}
|
|
|
|
log.color = {
|
|
default = 1,
|
|
blue = 2,
|
|
pink = 3,
|
|
orange = 4
|
|
}
|
|
|
|
|
|
log.kind = {
|
|
warning = 2,
|
|
failure = 3,
|
|
info = 4,
|
|
}
|
|
|
|
log.log = function(message, level, kind, source, color)
|
|
if not color then
|
|
if kind = log.kind.failure then
|
|
color = log.color.red
|
|
elseif kind = log.kind.warning then
|
|
color = log.color.orange
|
|
elseif kind = log
|
|
color = log.color.default
|
|
end
|
|
table.insert(log.actuallog, {message = message, level = level, source = source
|
|
end
|
|
|
|
|
|
log.actuallog = { { level = TRACE, message = "Log initialized", color = BLUE, source = "log.actallog Init"}
|
|
log.level = { INFO = 1, DEBUG = 2, TRACE = 3
|