From 30cc9a8d50574f17649bf19554d4b40a5282529a Mon Sep 17 00:00:00 2001 From: Squibid Date: Tue, 6 May 2025 17:13:58 -0500 Subject: [PATCH] improve logger --- lua/dep/log.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/dep/log.lua b/lua/dep/log.lua index f045250..36ef6c6 100644 --- a/lua/dep/log.lua +++ b/lua/dep/log.lua @@ -66,7 +66,8 @@ function logger:log(level, message, ...) vim.schedule(function() if not logger.silent then if level == "error" then - vim.api.nvim_echo({ { string.format("[dep] %s", message) } }, true, { err = true }) + vim.api.nvim_echo({ { string.format("[dep] %s", message) } }, true, + { err = true }) elseif logger.stage_colors[level] then vim.api.nvim_echo({ { "[dep]", "Identifier" }, @@ -78,7 +79,8 @@ function logger:log(level, message, ...) -- write to the pipe if it's open if logger.pipe then - logger.pipe:write(string.format("[%s] %s:%s: %s\n", os.date("%T"), source.short_src:gsub('.*%/', ''), source.currentline, message)) + logger.pipe:write(string.format("[%s] %s:%s: %s\n", os.date("%T"), + source.short_src:gsub('.*%/', ''), source.currentline, message)) end end) end