diff options
author | kylo252 <[email protected]> | 2022-04-14 21:24:35 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2022-04-14 21:24:35 +0200 |
commit | 6d2e18295f510c2f2167bd911b0d421a3b7f112e (patch) | |
tree | 453d5be502febdf596bf4b60b2d982b8b94db44a /lua/lvim/core/log.lua | |
parent | f92a0d610c1ee899ec8acb091130f2a5eec22812 (diff) | |
parent | 09684eff642eb455bffda3100f29ef182f734a82 (diff) |
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'lua/lvim/core/log.lua')
-rw-r--r-- | lua/lvim/core/log.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lua/lvim/core/log.lua b/lua/lvim/core/log.lua index d0e74f18..15ccb11c 100644 --- a/lua/lvim/core/log.lua +++ b/lua/lvim/core/log.lua @@ -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 |