fix(impatient): avoid get_options in fast handler (#2451)

This commit is contained in:
kylo252 2022-04-12 11:18:17 +02:00 committed by GitHub
parent 3de6a404c9
commit 1569202d39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 75 additions and 50 deletions

View file

@ -1,7 +1,5 @@
local Log = {}
local logfile = string.format("%s/%s.log", get_cache_dir(), "lvim")
Log.levels = {
TRACE = 1,
DEBUG = 2,
@ -39,7 +37,7 @@ function Log:init()
{ level = structlog.formatters.FormatColorizer.color_level() }
),
}),
structlog.sinks.File(log_level, logfile, {
structlog.sinks.File(log_level, self:get_path(), {
processors = {
structlog.processors.Namer(),
structlog.processors.StackWriter({ "line", "file" }, { max_parents = 3, stack_level = 2 }),
@ -155,7 +153,7 @@ end
---Retrieves the path of the logfile
---@return string path of the logfile
function Log:get_path()
return logfile
return string.format("%s/%s.log", get_cache_dir(), "lvim")
end
---Add a log entry at TRACE level