-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
---@class Log
---@field trace fun(...)
---@field debug fun(...)
---@field info fun(...)
---@field warn fun(...)
---@field error fun(...)
local M = {}
local function assignLogLevel()
local levelMap = {TRACE = 0, DEBUG = 1, INFO = 2, WARN = 3, ERROR = 4}
for level in pairs(levelMap) do
M[level:lower()] = function(...)
local argc = select('#', ...)
local _ = argc
-- ......
end
end
end
assignLogLevel()
M.debug('1', '2') -- The function received a maximum of 1 arguments, but got 2.
-- Lua Diagnostics.: redundant-parameter
return M
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working