1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-15 08:09:11 +08:00

refactor(logger): use string.format instead

This commit is contained in:
Shidong Wang 2021-11-13 16:15:29 +08:00
parent c8c232f4a1
commit d7bdd19301
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -38,7 +38,9 @@ end
function M._build_msg(msg, l)
msg = msg or ''
local time = fn.strftime('%H:%M:%S')
local log = '[ ' .. M.name .. ' ] [' .. time .. '] [ ' .. M.levels[l] .. '] ' .. msg
-- error(string.format("Tried to call API function with vim.fn: use vim.api.%s instead", key))
-- local log = '[ ' .. M.name .. ' ] [' .. time .. '] [ ' .. M.levels[l] .. '] ' .. msg
local log = string.format('[ %s ] [%s] [ %s ] %s', M.name, time, M.levels[l], msg)
return log
end