Skip to content

Commit

Permalink
Format with stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
Diegovsky authored and L3MON4D3 committed Sep 12, 2024
1 parent 3f6ef2c commit e808bee
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lua/luasnip/util/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,24 @@ local M = {}

--- The file path we're currently logging into.
function M.log_location()
return logpath
return logpath
end
--- Time formatting for logs. Defaults to '%X'.
M.time_fmt = '%X'
M.time_fmt = "%X"

local function make_log_level(level)
return function(msg)
log_line_append(string.format("%s | %s | %s", level, os.date(M.time_fmt), msg))
end
return function(msg)
log_line_append(
string.format("%s | %s | %s", level, os.date(M.time_fmt), msg)
)
end
end

local log = {
error = make_log_level('ERROR'),
warn = make_log_level('WARN'),
info = make_log_level('INFO'),
debug = make_log_level('DEBUG'),
error = make_log_level("ERROR"),
warn = make_log_level("WARN"),
info = make_log_level("INFO"),
debug = make_log_level("DEBUG"),
}

-- functions copied directly by deepcopy.
Expand Down

0 comments on commit e808bee

Please sign in to comment.